diff options
author | Oz Linden <oz@lindenlab.com> | 2015-01-13 13:46:45 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-01-13 13:46:45 -0500 |
commit | 6f3cf79a3afa66db229a1c1068e0c01f246f0b79 (patch) | |
tree | 5eb6e710adc6a0c770f681fabb44fd385dbef977 /indra/llui/llfolderviewitem.cpp | |
parent | ccd10beb6f8523c401b08d57e916c85d756eb27e (diff) | |
parent | fad02b30ce61a38007c5cd450cbdd2e09464888d (diff) |
merge changes for 3.7.24-release
Diffstat (limited to 'indra/llui/llfolderviewitem.cpp')
-rw-r--r-- | indra/llui/llfolderviewitem.cpp | 19 |
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() |