mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-25 02:04:23 +00:00
Projucer: Improved file filter method
This commit is contained in:
parent
a1b55a4025
commit
238bca7420
1 changed files with 4 additions and 7 deletions
|
|
@ -82,19 +82,16 @@ public:
|
|||
|
||||
bool isGroupEmpty (const Project::Item& group) // recursive
|
||||
{
|
||||
bool isEmpty = true;
|
||||
|
||||
for (auto i = 0; i < group.getNumChildren(); ++i)
|
||||
{
|
||||
auto child = group.getChild (i);
|
||||
|
||||
if (child.isGroup())
|
||||
isEmpty = isGroupEmpty (child);
|
||||
else if (child.isFile() && child.getName().containsIgnoreCase (searchFilter))
|
||||
isEmpty = false;
|
||||
if ((child.isGroup() && ! isGroupEmpty (child))
|
||||
|| (child.isFile() && child.getName().containsIgnoreCase (searchFilter)))
|
||||
return false;
|
||||
}
|
||||
|
||||
return isEmpty;
|
||||
return true;
|
||||
}
|
||||
|
||||
ProjectTreeItemBase* createSubItem (const Project::Item& child) override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue