aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfolderview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfolderview.cpp')
-rw-r--r--linden/indra/newview/llfolderview.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp
index 377e620..1007bc4 100644
--- a/linden/indra/newview/llfolderview.cpp
+++ b/linden/indra/newview/llfolderview.cpp
@@ -1245,7 +1245,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
1245 } 1245 }
1246 1246
1247 // when applying a filter, matching folders get their contents downloaded first 1247 // when applying a filter, matching folders get their contents downloaded first
1248 if (getRoot()->isFilterActive() && getFiltered(filter.getMinRequiredGeneration()) && !gInventory.isCategoryComplete(mListener->getUUID())) 1248 if (filter.isNotDefault() && getFiltered(filter.getMinRequiredGeneration()) && !gInventory.isCategoryComplete(mListener->getUUID()))
1249 { 1249 {
1250 gInventory.startBackgroundFetch(mListener->getUUID()); 1250 gInventory.startBackgroundFetch(mListener->getUUID());
1251 } 1251 }
@@ -2543,6 +2543,7 @@ LLFolderView::LLFolderView( const LLString& name, LLViewerImage* root_folder_ico
2543 mShowSingleSelection(FALSE), 2543 mShowSingleSelection(FALSE),
2544 mArrangeGeneration(0), 2544 mArrangeGeneration(0),
2545 mSelectCallback(NULL), 2545 mSelectCallback(NULL),
2546 mSelectionChanged(FALSE),
2546 mMinWidth(0), 2547 mMinWidth(0),
2547 mDragAndDropThisFrame(FALSE) 2548 mDragAndDropThisFrame(FALSE)
2548{ 2549{
@@ -4237,7 +4238,7 @@ void LLFolderView::idle(void* user_data)
4237 4238
4238 self->mFilter.clearModified(); 4239 self->mFilter.clearModified();
4239 BOOL filter_modified_and_active = self->mCompletedFilterGeneration < self->mFilter.getCurrentGeneration() && 4240 BOOL filter_modified_and_active = self->mCompletedFilterGeneration < self->mFilter.getCurrentGeneration() &&
4240 self->mFilter.isActive(); 4241 self->mFilter.isNotDefault();
4241 self->mNeedsAutoSelect = filter_modified_and_active && 4242 self->mNeedsAutoSelect = filter_modified_and_active &&
4242 !(gFocusMgr.childHasKeyboardFocus(self) || gFocusMgr.getMouseCapture()); 4243 !(gFocusMgr.childHasKeyboardFocus(self) || gFocusMgr.getMouseCapture());
4243 4244
@@ -4427,9 +4428,11 @@ LLInventoryFilter::LLInventoryFilter(const LLString& name) :
4427 mFilterGeneration = 0; 4428 mFilterGeneration = 0;
4428 mMustPassGeneration = S32_MAX; 4429 mMustPassGeneration = S32_MAX;
4429 mMinRequiredGeneration = 0; 4430 mMinRequiredGeneration = 0;
4431 mFilterCount = 0;
4430 mNextFilterGeneration = mFilterGeneration + 1; 4432 mNextFilterGeneration = mFilterGeneration + 1;
4431 4433
4432 mLastLogoff = gSavedPerAccountSettings.getU32("LastLogoff"); 4434 mLastLogoff = gSavedPerAccountSettings.getU32("LastLogoff");
4435 mFilterBehavior = FILTER_NONE;
4433} 4436}
4434 4437
4435LLInventoryFilter::~LLInventoryFilter() 4438LLInventoryFilter::~LLInventoryFilter()
@@ -4469,7 +4472,7 @@ std::string::size_type LLInventoryFilter::getStringMatchOffset() const
4469} 4472}
4470 4473
4471// has user modified default filter params? 4474// has user modified default filter params?
4472BOOL LLInventoryFilter::isActive() 4475BOOL LLInventoryFilter::isNotDefault()
4473{ 4476{
4474 return mFilterOps.mFilterTypes != mDefaultFilterOps.mFilterTypes 4477 return mFilterOps.mFilterTypes != mDefaultFilterOps.mFilterTypes
4475 || mFilterSubString.size() 4478 || mFilterSubString.size()
@@ -4479,6 +4482,16 @@ BOOL LLInventoryFilter::isActive()
4479 || mFilterOps.mHoursAgo != mDefaultFilterOps.mHoursAgo; 4482 || mFilterOps.mHoursAgo != mDefaultFilterOps.mHoursAgo;
4480} 4483}
4481 4484
4485BOOL LLInventoryFilter::isActive()
4486{
4487 return mFilterOps.mFilterTypes != 0xffffffff
4488 || mFilterSubString.size()
4489 || mFilterOps.mPermissions != PERM_NONE
4490 || mFilterOps.mMinDate != 0
4491 || mFilterOps.mMaxDate != U32_MAX
4492 || mFilterOps.mHoursAgo != 0;
4493}
4494
4482BOOL LLInventoryFilter::isModified() 4495BOOL LLInventoryFilter::isModified()
4483{ 4496{
4484 return mModified; 4497 return mModified;
@@ -4688,7 +4701,7 @@ void LLInventoryFilter::setModified(EFilterBehavior behavior)
4688 mFilterBehavior = FILTER_RESTART; 4701 mFilterBehavior = FILTER_RESTART;
4689 } 4702 }
4690 4703
4691 if (isActive()) 4704 if (isNotDefault())
4692 { 4705 {
4693 // if not keeping current filter results, update last valid as well 4706 // if not keeping current filter results, update last valid as well
4694 switch(mFilterBehavior) 4707 switch(mFilterBehavior)