summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderviewitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfolderviewitem.cpp')
-rw-r--r--indra/newview/llfolderviewitem.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index fe793fbcb8..135821f662 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -122,7 +122,7 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p)
mHasVisibleChildren(FALSE),
mIndentation(0),
mNumDescendantsSelected(0),
- mFiltered(FALSE),
+ mPassedFilter(FALSE),
mLastFilterGeneration(-1),
mStringMatchOffset(std::string::npos),
mControlLabelRotation(0.f),
@@ -224,17 +224,17 @@ BOOL LLFolderViewItem::potentiallyVisible()
BOOL LLFolderViewItem::getFiltered()
{
- return mFiltered && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration();
+ return mPassedFilter && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration();
}
BOOL LLFolderViewItem::getFiltered(S32 filter_generation)
{
- return mFiltered && mLastFilterGeneration >= filter_generation;
+ return mPassedFilter && mLastFilterGeneration >= filter_generation;
}
void LLFolderViewItem::setFiltered(BOOL filtered, S32 filter_generation)
{
- mFiltered = filtered;
+ mPassedFilter = filtered;
mLastFilterGeneration = filter_generation;
}
@@ -424,19 +424,20 @@ S32 LLFolderViewItem::getItemHeight()
void LLFolderViewItem::filter( LLInventoryFilter& filter)
{
- BOOL filtered = mListener && filter.check(this);
+ const BOOL previous_passed_filter = mPassedFilter;
+ const BOOL passed_filter = mListener && filter.check(this);
- // if our visibility will change as a result of this filter, then
+ // If our visibility will change as a result of this filter, then
// we need to be rearranged in our parent folder
- if (getVisible() != filtered)
+ if (mParentFolder)
{
- if (mParentFolder)
- {
+ if (getVisible() != passed_filter)
+ mParentFolder->requestArrange();
+ if (passed_filter != previous_passed_filter)
mParentFolder->requestArrange();
- }
}
- setFiltered(filtered, filter.getCurrentGeneration());
+ setFiltered(passed_filter, filter.getCurrentGeneration());
mStringMatchOffset = filter.getStringMatchOffset();
filter.decrementFilterCount();
@@ -1243,7 +1244,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
if (getLastFilterGeneration() < filter_generation)
{
if (getLastFilterGeneration() >= must_pass_generation && // folder has been compared to a valid precursor filter
- !mFiltered) // and did not pass the filter
+ !mPassedFilter) // and did not pass the filter
{
// go ahead and flag this folder as done
mLastFilterGeneration = filter_generation;
@@ -1381,7 +1382,7 @@ void LLFolderViewFolder::setFiltered(BOOL filtered, S32 filter_generation)
{
// if this folder is now filtered, but wasn't before
// (it just passed)
- if (filtered && !mFiltered)
+ if (filtered && !mPassedFilter)
{
// reset current height, because last time we drew it
// it might have had more visible items than now