| 1553 | } |
| 1554 | |
| 1555 | Project::Item Project::Item::findItemWithID (const String& targetId) const |
| 1556 | { |
| 1557 | if (state [Ids::ID] == targetId) |
| 1558 | return *this; |
| 1559 | |
| 1560 | if (isGroup()) |
| 1561 | { |
| 1562 | for (auto i = getNumChildren(); --i >= 0;) |
| 1563 | { |
| 1564 | auto found = getChild(i).findItemWithID (targetId); |
| 1565 | |
| 1566 | if (found.isValid()) |
| 1567 | return found; |
| 1568 | } |
| 1569 | } |
| 1570 | |
| 1571 | return Item (project, ValueTree(), false); |
| 1572 | } |
| 1573 | |
| 1574 | bool Project::Item::canContain (const Item& child) const |
| 1575 | { |
no test coverage detected