diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2017-08-29 01:52:14 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2017-08-29 01:52:14 +0300 |
commit | 8ed869a22e372b0fc1eefdd010e97994e97417c9 (patch) | |
tree | 15660222ce28c43823743c17e5507a152577b596 /indra/newview/llfolderviewmodelinventory.cpp | |
parent | 5bcdbd976d9cf010e55fafb3f977f7640566e239 (diff) |
MAINT-7625 Fixed wrong warning when deleting an empty folder
Diffstat (limited to 'indra/newview/llfolderviewmodelinventory.cpp')
-rw-r--r-- | indra/newview/llfolderviewmodelinventory.cpp | 9 |
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(); } |