From 8ed869a22e372b0fc1eefdd010e97994e97417c9 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 29 Aug 2017 01:52:14 +0300 Subject: MAINT-7625 Fixed wrong warning when deleting an empty folder --- indra/newview/llfolderviewmodelinventory.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview') 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(view_model->mParent); + } + } setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize()); continue_filtering = !filter.isTimedOut(); } -- cgit v1.2.3