summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfilter.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-05-06 22:13:40 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-05-06 22:13:40 +0300
commitf655bb1f27fa637ef1889f8bb83bb0d74d645059 (patch)
tree9992f73059230cf04c8f0b9206fac306f23c8db3 /indra/newview/llinventoryfilter.cpp
parent0bf68ce7363dc9114000a6a5a40de87f79b28f37 (diff)
parentce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff)
Merge branch master (DRTVWR-515) into DRTVWR-483
# Conflicts: # indra/newview/CMakeLists.txt # indra/newview/llpanelpicks.cpp (was replaced with a tab in floater)
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
-rw-r--r--indra/newview/llinventoryfilter.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 72013f7396..2a22eb1329 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -74,6 +74,7 @@ LLInventoryFilter::LLInventoryFilter(const Params& p)
: mName(p.name),
mFilterModified(FILTER_NONE),
mEmptyLookupMessage("InventoryNoMatchingItems"),
+ mDefaultEmptyLookupMessage(""),
mFilterOps(p.filter_ops),
mBackupFilterOps(mFilterOps),
mFilterSubString(p.substring),
@@ -1441,12 +1442,24 @@ void LLInventoryFilter::setEmptyLookupMessage(const std::string& message)
mEmptyLookupMessage = message;
}
+void LLInventoryFilter::setDefaultEmptyLookupMessage(const std::string& message)
+{
+ mDefaultEmptyLookupMessage = message;
+}
+
std::string LLInventoryFilter::getEmptyLookupMessage() const
{
- LLStringUtil::format_map_t args;
- args["[SEARCH_TERM]"] = LLURI::escape(getFilterSubStringOrig());
+ if (isDefault() && !mDefaultEmptyLookupMessage.empty())
+ {
+ return LLTrans::getString(mDefaultEmptyLookupMessage);
+ }
+ else
+ {
+ LLStringUtil::format_map_t args;
+ args["[SEARCH_TERM]"] = LLURI::escape(getFilterSubStringOrig());
- return LLTrans::getString(mEmptyLookupMessage, args);
+ return LLTrans::getString(mEmptyLookupMessage, args);
+ }
}