summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llfolderviewitem.cpp19
-rwxr-xr-xindra/newview/llfolderviewmodelinventory.cpp9
2 files changed, 16 insertions, 12 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 7c88f8fb9b..6dd6f94d02 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -258,20 +258,19 @@ BOOL LLFolderViewItem::passedFilter(S32 filter_generation)
BOOL LLFolderViewItem::isPotentiallyVisible(S32 filter_generation)
{
- // Item should be visible if:
- // 1. item passed current filter
- // 2. item was updated (gen < 0) but has descendants that passed filter
- // 3. item was recently updated and was visible before update
-
- LLFolderViewModelItem* model = getViewModelItem();
- if (model->getLastFilterGeneration() < 0 && !getFolderViewModel()->getFilter().isModified())
+ if (filter_generation < 0)
{
- return model->descendantsPassedFilter(filter_generation) || getVisible();
+ filter_generation = getFolderViewModel()->getFilter().getFirstSuccessGeneration();
}
- else
+ LLFolderViewModelItem* model = getViewModelItem();
+ BOOL visible = model->passedFilter(filter_generation);
+ if (model->getMarkedDirtyGeneration() >= filter_generation)
{
- return model->passedFilter(filter_generation);
+ // unsure visibility state
+ // retaining previous visibility until item is updated or filter generation changes
+ visible |= getVisible();
}
+ return visible;
}
void LLFolderViewItem::refresh()
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index 7bac47a317..3271a40ea0 100755
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -129,13 +129,18 @@ void LLFolderViewModelItemInventory::requestSort()
void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset, std::string::size_type string_size)
{
+ bool generation_skip = mMarkedDirtyGeneration >= 0
+ && mPrevPassedAllFilters
+ && mMarkedDirtyGeneration < mRootViewModel.getFilter().getFirstSuccessGeneration();
LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size);
bool before = mPrevPassedAllFilters;
mPrevPassedAllFilters = passedFilter(filter_generation);
- if (before != mPrevPassedAllFilters)
+ if (before != mPrevPassedAllFilters || generation_skip)
{
- // Need to rearrange the folder if the filtered state of the item changed
+ // Need to rearrange the folder if the filtered state of the item changed,
+ // previously passed item skipped filter generation changes while being dirty
+ // or previously passed not yet filtered item was marked dirty
LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder();
if (parent_folder)
{