From a1931d8cc4820eb4e20f1346fc7c3e0139c5863b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 16 Jan 2023 04:42:33 +0200 Subject: SL-18735 Using "Find original" in main inventory tab breaks inventory view Fixes folders being invidible (missing arrange) Fixes sroll to target not working reliably --- indra/newview/llfolderviewmodelinventory.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfolderviewmodelinventory.cpp') diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index b6d856e31b..241aa96bc8 100644 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -182,11 +182,15 @@ void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_gen bool generation_skip = mMarkedDirtyGeneration >= 0 && mPrevPassedAllFilters && mMarkedDirtyGeneration < mRootViewModel.getFilter().getFirstSuccessGeneration(); + S32 last_generation = mLastFilterGeneration; LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size); bool before = mPrevPassedAllFilters; mPrevPassedAllFilters = passedFilter(filter_generation); - if (before != mPrevPassedAllFilters || generation_skip) + if (before != mPrevPassedAllFilters // Change of state + || generation_skip // Was marked dirty + // Potential change from being in-progress and invisible to visible) + || (mPrevPassedAllFilters && last_generation < mRootViewModel.getFilter().getFirstRequiredGeneration())) { // Need to rearrange the folder if the filtered state of the item changed, // previously passed item skipped filter generation changes while being dirty -- cgit v1.2.3