diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 23 | ||||
-rw-r--r-- | indra/newview/llfolderviewitem.h | 5 |
2 files changed, 24 insertions, 4 deletions
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index d3b204200a..1fb8c52068 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -1204,9 +1204,9 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation) else { folderp->setVisible( folderp->getListener() - && ((folderp->getFilteredFolder(filter_generation) - && folderp->getFiltered(filter_generation)) - || folderp->hasFilteredDescendants(filter_generation))); // passed filter or has descendants that passed filter + && (folderp->getFiltered(filter_generation) + || (folderp->getFilteredFolder(filter_generation) + && folderp->hasFilteredDescendants(filter_generation)))); // passed filter or has descendants that passed filter } if (folderp->getVisible()) @@ -1531,6 +1531,23 @@ void LLFolderViewFolder::dirtyFilter() LLFolderViewItem::dirtyFilter(); } +BOOL LLFolderViewFolder::getFiltered() +{ + return getFilteredFolder(getRoot()->getFilter()->getMinRequiredGeneration()) + && LLFolderViewItem::getFiltered(); +} + +BOOL LLFolderViewFolder::getFiltered(S32 filter_generation) +{ + return getFilteredFolder(filter_generation) && LLFolderViewItem::getFiltered(filter_generation); +} + +BOOL LLFolderViewFolder::hasFilteredDescendants(S32 filter_generation) +{ + return mMostFilteredDescendantGeneration >= filter_generation; +} + + BOOL LLFolderViewFolder::hasFilteredDescendants() { return mMostFilteredDescendantGeneration >= getRoot()->getFilter()->getCurrentGeneration(); diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index b9a1cdd9c8..6046188c1e 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -424,12 +424,15 @@ public: virtual void setCompletedFilterGeneration(S32 generation, BOOL recurse_up); virtual S32 getCompletedFilterGeneration() { return mCompletedFilterGeneration; } - BOOL hasFilteredDescendants(S32 filter_generation) { return mMostFilteredDescendantGeneration >= filter_generation; } + BOOL hasFilteredDescendants(S32 filter_generation); BOOL hasFilteredDescendants(); // applies filters to control visibility of inventory items virtual void filter( LLInventoryFilter& filter); virtual void setFiltered(BOOL filtered, S32 filter_generation); + virtual BOOL getFiltered(); + virtual BOOL getFiltered(S32 filter_generation); + virtual void dirtyFilter(); // folder-specific filtering (filter status propagates top down instead of bottom up) |