diff options
author | Merov Linden <merov@lindenlab.com> | 2014-12-19 06:00:48 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-12-19 06:00:48 -0800 |
commit | b0f590f6ab4033503ff9d80e2374e374397d40fb (patch) | |
tree | 97e9758c011105b48218cbd2e611c51cc967520d /indra/llui/llfolderviewitem.cpp | |
parent | d0d5a6a15cf3c573c89ce590030c7a150b19dd05 (diff) | |
parent | 4ec9bce3c2a715f53938e4568c95b7a2bdfc9e16 (diff) |
Pull merge from lindenlab/viewer-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 8e5f0b97f5..f2bb71c53b 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -260,20 +260,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() |