summaryrefslogtreecommitdiff
path: root/indra/llui/llfolderviewitem.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-01-13 13:46:45 -0500
committerOz Linden <oz@lindenlab.com>2015-01-13 13:46:45 -0500
commit6f3cf79a3afa66db229a1c1068e0c01f246f0b79 (patch)
tree5eb6e710adc6a0c770f681fabb44fd385dbef977 /indra/llui/llfolderviewitem.cpp
parentccd10beb6f8523c401b08d57e916c85d756eb27e (diff)
parentfad02b30ce61a38007c5cd450cbdd2e09464888d (diff)
merge changes for 3.7.24-release
Diffstat (limited to 'indra/llui/llfolderviewitem.cpp')
-rw-r--r--indra/llui/llfolderviewitem.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index ffbc02fd08..747b472ac2 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()