From a204059d2e69fb33cb1a3c8d2fbed35d3967297c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 1 Aug 2012 01:14:27 -0700 Subject: CHUI-267 FIX Full inventory listing not always shown for test account changed LLFolderViewModelInterface::getFilter() to return a reference, since it is never NULL removed sort order from filter, which was causing unneeded filtering --- indra/newview/llfolderviewmodelinventory.cpp | 40 +++++++++------------------- 1 file changed, 12 insertions(+), 28 deletions(-) (limited to 'indra/newview/llfolderviewmodelinventory.cpp') diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index 13ca73917b..21218850a6 100644 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -109,7 +109,12 @@ bool LLFolderViewModelInventory::contentsReady() void LLFolderViewModelItemInventory::requestSort() { LLFolderViewModelItemCommon::requestSort(); - if (mRootViewModel.getSorter().isByDate()) + LLFolderViewFolder* folderp = dynamic_cast(mFolderViewItem); + if (folderp) + { + folderp->requestArrange(); + } + if (static_cast(mRootViewModel).getSorter().isByDate()) { // sort by date potentially affects parent folders which use a date // derived from newest item in them @@ -120,35 +125,9 @@ void LLFolderViewModelItemInventory::requestSort() } } -bool LLFolderViewModelItemInventory::potentiallyVisible() -{ - return passedFilter() // we've passed the filter - || getLastFilterGeneration() < mRootViewModel.getFilter()->getFirstSuccessGeneration() // or we don't know yet - || descendantsPassedFilter(); -} - -bool LLFolderViewModelItemInventory::passedFilter(S32 filter_generation) -{ - if (filter_generation < 0) - filter_generation = mRootViewModel.getFilter()->getFirstSuccessGeneration(); - - return mPassedFolderFilter - && (descendantsPassedFilter(filter_generation) - || (mLastFilterGeneration >= filter_generation - && mPassedFilter)); -} - -bool LLFolderViewModelItemInventory::descendantsPassedFilter(S32 filter_generation) -{ - if (filter_generation < 0) filter_generation = mRootViewModel.getFilter()->getFirstSuccessGeneration(); - return mMostFilteredDescendantGeneration >= filter_generation; -} - void LLFolderViewModelItemInventory::setPassedFilter(bool passed, bool passed_folder, S32 filter_generation) { - mPassedFilter = passed; - mPassedFolderFilter = passed_folder; - mLastFilterGeneration = filter_generation; + LLFolderViewModelItemCommon::setPassedFilter(passed, passed_folder, filter_generation); bool passed_filter_before = mPrevPassedAllFilters; mPrevPassedAllFilters = passedFilter(filter_generation); @@ -324,3 +303,8 @@ bool LLInventorySort::operator()(const LLFolderViewModelItemInventory* const& a, } } +LLFolderViewModelItemInventory::LLFolderViewModelItemInventory( class LLFolderViewModelInventory& root_view_model ) + : LLFolderViewModelItemCommon(root_view_model), + mPrevPassedAllFilters(false) +{ +} -- cgit v1.2.3