summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfilter.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-11 15:57:41 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-11 15:57:41 -0500
commitd2b72fe0184fb92f4a79eebd242825fbcc5f32e9 (patch)
tree1d8bb75f6db751ae2e347737b2df3fb3f26f37e8 /indra/newview/llinventoryfilter.cpp
parent3cb997a50475f4de54090f3e3a4490aac9e6d218 (diff)
EXT-3373 : Favorites folder disappears after canceling filter
Doing a more robust check to see if folders need to be refreshed. --HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
-rw-r--r--indra/newview/llinventoryfilter.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 81b10f5a62..522edd0cb5 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -40,6 +40,7 @@
#include "llinventorymodel.h" // gInventory.backgroundFetchActive()
#include "llviewercontrol.h"
#include "llviewerinventory.h"
+#include "llfolderview.h"
// linden library includes
#include "lltrans.h"
@@ -329,7 +330,6 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
mFilterSubString = string;
LLStringUtil::toUpper(mFilterSubString);
LLStringUtil::trimHead(mFilterSubString);
-
if (less_restrictive)
{
setModified(FILTER_LESS_RESTRICTIVE);
@@ -512,21 +512,21 @@ void LLInventoryFilter::setModified(EFilterBehavior behavior)
// if not keeping current filter results, update last valid as well
switch(mFilterBehavior)
{
- case FILTER_RESTART:
- mMustPassGeneration = mFilterGeneration;
- mMinRequiredGeneration = mFilterGeneration;
- break;
- case FILTER_LESS_RESTRICTIVE:
- mMustPassGeneration = mFilterGeneration;
- break;
- case FILTER_MORE_RESTRICTIVE:
- mMinRequiredGeneration = mFilterGeneration;
- // must have passed either current filter generation (meaningless, as it hasn't been run yet)
- // or some older generation, so keep the value
- mMustPassGeneration = llmin(mMustPassGeneration, mFilterGeneration);
- break;
- default:
- llerrs << "Bad filter behavior specified" << llendl;
+ case FILTER_RESTART:
+ mMustPassGeneration = mFilterGeneration;
+ mMinRequiredGeneration = mFilterGeneration;
+ break;
+ case FILTER_LESS_RESTRICTIVE:
+ mMustPassGeneration = mFilterGeneration;
+ break;
+ case FILTER_MORE_RESTRICTIVE:
+ mMinRequiredGeneration = mFilterGeneration;
+ // must have passed either current filter generation (meaningless, as it hasn't been run yet)
+ // or some older generation, so keep the value
+ mMustPassGeneration = llmin(mMustPassGeneration, mFilterGeneration);
+ break;
+ default:
+ llerrs << "Bad filter behavior specified" << llendl;
}
}
else