diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-04-30 03:04:47 +0300 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-04-30 03:04:47 +0300 |
| commit | 0fa5fc47a2069a2c151536baa917b9c6978480e4 (patch) | |
| tree | 2964096f28a6a5e7f08e5a0aa83f2ffe76d42421 /indra/newview/llinventoryfilter.cpp | |
| parent | 498b72aacd6d10dfcd4f15e1d16532dc138f0461 (diff) | |
| parent | ce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff) | |
Merge branch 'master' into DRTVWR-527-maint
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
| -rw-r--r-- | indra/newview/llinventoryfilter.cpp | 19 |
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); + } } |
