summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfilter.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-06-28 23:30:36 -0700
committerRichard Linden <none@none>2012-06-28 23:30:36 -0700
commit604bbb22783d2460384e340592ca1781908f6dd8 (patch)
tree42afa4894daf9a09e3935e32885c42f83f508162 /indra/newview/llinventoryfilter.cpp
parented7173c987cf4a5de2f3c9b9d792e5ac4006e833 (diff)
CHUI-101 WIP Make LLFolderview general purpose
cleaned up ownership of viewmodel more filtering fixes
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
-rw-r--r--indra/newview/llinventoryfilter.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index c7e0136368..08f1e541b5 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -95,16 +95,13 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
return passed_clipboard;
}
- std::string::size_type string_offset = mFilterSubString.size() ? listener->getSearchableName().find(mFilterSubString) : std::string::npos;
+ std::string::size_type string_offset = mFilterSubString.size() ? listener->getSearchableName().find(mFilterSubString) : 0;
- const BOOL passed_filtertype = checkAgainstFilterType(listener);
- const BOOL passed_permissions = checkAgainstPermissions(listener);
- const BOOL passed_filterlink = checkAgainstFilterLinks(listener);
- const BOOL passed = (passed_filtertype &&
- passed_permissions &&
- passed_filterlink &&
- passed_clipboard &&
- (mFilterSubString.size() == 0 || string_offset != std::string::npos));
+ BOOL passed = string_offset != std::string::npos;
+ passed = passed && checkAgainstFilterType(listener);
+ passed = passed && checkAgainstPermissions(listener);
+ passed = passed && checkAgainstFilterLinks(listener);
+ passed = passed && passed_clipboard;
return passed;
}
@@ -595,7 +592,7 @@ void LLInventoryFilter::setDateRange(time_t min_date, time_t max_date)
void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl)
{
- static LLCachedControl<U32> s_last_logoff(gSavedSettings, "LastLogoff", 0);
+ static LLCachedControl<U32> s_last_logoff(gSavedPerAccountSettings, "LastLogoff", 0);
if (sl && !isSinceLogoff())
{
setDateRange(s_last_logoff(), time_max());