diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-02-13 03:38:54 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-02-13 18:45:01 +0200 |
| commit | 8c70eb59ba64d5442420f15794e4badcd13740ad (patch) | |
| tree | 39c592360c3a7a7f0da6d17f0abadf6f9a13ff1e | |
| parent | b404990bb568a0ad222da1fb0187240f9eab8b51 (diff) | |
#1807 Fix navigation bar's search filters
| -rw-r--r-- | indra/newview/llfloatersearch.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/llnavigationbar.cpp | 9 |
2 files changed, 25 insertions, 5 deletions
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 9b7a4e5134..3c84f5b459 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -123,19 +123,32 @@ void LLFloaterSearch::initiateSearch(const LLSD& tokens) subs["COLLECTION"] = ""; if (subs["TYPE"] == "standard") { + std::string collection_args; if (mCollectionType.find(collection) != mCollectionType.end()) { - subs["COLLECTION"] = "&collection_chosen=" + std::string(collection); + collection_args = "&collection_chosen=" + std::string(collection); } - else + else if (tokens.has("collections") && tokens["collections"].isArray()) + { + const LLSD &sd = tokens["collections"]; + for (LLSD::array_const_iterator it = sd.beginArray(); + it != sd.endArray(); + ++it) + { + if (mCollectionType.find(it->asString()) != mCollectionType.end()) + { + collection_args += "&collection_chosen=" + std::string(*it); + } + } + } + if (collection_args.empty()) { - std::string collection_args(""); for (std::set<std::string>::iterator it = mCollectionType.begin(); it != mCollectionType.end(); ++it) { collection_args += "&collection_chosen=" + std::string(*it); } - subs["COLLECTION"] = collection_args; } + subs["COLLECTION"] = collection_args; } // Default to PG diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index dfead5ee8a..9a0612e9f9 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -712,7 +712,14 @@ void LLNavigationBar::resizeLayoutPanel() } void LLNavigationBar::invokeSearch(std::string search_text) { - LLFloaterReg::showInstance("search", LLSD().with("category", "standard").with("query", LLSD(search_text))); + LLSD key; + key["category"] = "standard"; + key["query"] = search_text; + LLSD collections = LLSD::emptyArray(); + collections.append("destinations"); + collections.append("places"); + key["collections"] = collections; + LLFloaterReg::showInstance("search", key); } void LLNavigationBar::clearHistoryCache() |
