summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderviewmodelinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfolderviewmodelinventory.cpp')
-rw-r--r--indra/newview/llfolderviewmodelinventory.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index e9f80b795a..d53cf2a9a3 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -258,6 +258,15 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter)
{
// This is where filter check on the item done (CHUI-849)
const bool passed_filter = filter.check(this);
+ if (passed_filter && mChildren.empty()) // Update the latest filter generation for empty folders
+ {
+ LLFolderViewModelItemInventory* view_model = this;
+ while (view_model && view_model->mMostFilteredDescendantGeneration < filter_generation)
+ {
+ view_model->mMostFilteredDescendantGeneration = filter_generation;
+ view_model = static_cast<LLFolderViewModelItemInventory*>(view_model->mParent);
+ }
+ }
setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize());
continue_filtering = !filter.isTimedOut();
}