summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorsimon <none@none>2014-08-21 09:11:11 -0700
committersimon <none@none>2014-08-21 09:11:11 -0700
commit95a14433b8b6375b8d62970c6df5a08d98764423 (patch)
tree8578902253fc5454827e24eedc39717be9d987e2 /indra/llui
parenta14ba78dbbfc925c94f1e8ed94b52bc08e626e3d (diff)
parent518cc86156c2e10b9e603ac9e661f8c35faf5f70 (diff)
Merge downstream code into viewer-lion and become version 3.7.15
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfolderviewitem.cpp21
-rwxr-xr-xindra/llui/lltooltip.cpp3
2 files changed, 13 insertions, 11 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 6ae03adcb9..7c88f8fb9b 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -258,19 +258,20 @@ BOOL LLFolderViewItem::passedFilter(S32 filter_generation)
BOOL LLFolderViewItem::isPotentiallyVisible(S32 filter_generation)
{
- if (filter_generation < 0)
+ // 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())
{
- filter_generation = getFolderViewModel()->getFilter().getFirstSuccessGeneration();
+ return model->descendantsPassedFilter(filter_generation) || getVisible();
}
- LLFolderViewModelItem* model = getViewModelItem();
- BOOL visible = model->passedFilter(filter_generation);
- if (model->getMarkedDirtyGeneration() >= filter_generation)
+ else
{
- // unsure visibility state
- // retaining previous visibility until item is updated or filter generation changes
- visible |= getVisible();
+ return model->passedFilter(filter_generation);
}
- return visible;
}
void LLFolderViewItem::refresh()
@@ -985,7 +986,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height )
getRoot()->getFolderViewModel()->sort(this);
LL_RECORD_BLOCK_TIME(FTM_ARRANGE);
-
+
// evaluate mHasVisibleChildren
mHasVisibleChildren = false;
if (getViewModelItem()->descendantsPassedFilter())
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp
index 5e1f12996e..7f2224870d 100755
--- a/indra/llui/lltooltip.cpp
+++ b/indra/llui/lltooltip.cpp
@@ -477,7 +477,8 @@ void LLToolTipMgr::show(const std::string& msg)
void LLToolTipMgr::show(const LLToolTip::Params& params)
{
if (!params.styled_message.isProvided()
- && (!params.message.isProvided() || params.message().empty())) return;
+ && (!params.message.isProvided() || params.message().empty())
+ && !params.image.isProvided()) return;
// fill in default tooltip params from tool_tip.xml
LLToolTip::Params params_with_defaults(params);