diff options
| author | Callum Prentice <callum@lindenlab.com> | 2021-04-29 13:45:15 -0700 |
|---|---|---|
| committer | Callum Prentice <callum@lindenlab.com> | 2021-04-29 13:45:15 -0700 |
| commit | 99b99a1b4a21758ef888b251d8f8bbf565f8b42e (patch) | |
| tree | 5c91eaa4a6dffd724cdb0cb8f4de8c11f82335a5 /indra/newview/llinventoryfilter.cpp | |
| parent | 0df59ff9e6e50237d36a976731e81c6e37e73933 (diff) | |
| parent | ce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff) | |
Clean up a merge conflict
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); + } } |
