From 534ce82eb68a1412e062399172ae22b55c0a9fc2 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 7 Sep 2017 11:51:57 +0300 Subject: MAINT-7768 FIXED Unable to get Choose to work in Abuse Report means unable to file AR --- indra/newview/llfloateravatarpicker.cpp | 19 ++++++++++++++++--- .../skins/default/xui/en/floater_avatar_picker.xml | 4 ++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index c394eb815b..c5561fe011 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -496,6 +496,18 @@ void LLFloaterAvatarPicker::find() std::string text = getChild("Edit")->getValue().asString(); + size_t separator_index = text.find_first_of(" ._"); + if (separator_index != text.npos) + { + std::string first = text.substr(0, separator_index); + std::string last = text.substr(separator_index+1, text.npos); + LLStringUtil::trim(last); + if("Resident" == last) + { + text = first; + } + } + mQueryID.generate(); std::string url; @@ -739,12 +751,13 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD& if (search_results->isEmpty()) { - LLStringUtil::format_map_t map; - map["[TEXT]"] = getChild("Edit")->getValue().asString(); + std::string name = "'" + getChild("Edit")->getValue().asString() + "'"; LLSD item; item["id"] = LLUUID::null; item["columns"][0]["column"] = "name"; - item["columns"][0]["value"] = getString("not_found", map); + item["columns"][0]["value"] = name; + item["columns"][1]["column"] = "username"; + item["columns"][1]["value"] = getString("not_found_text"); search_results->addElement(item); search_results->setEnabled(false); getChildView("ok_btn")->setEnabled(false); diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml index 1a55dc2e2c..dddb258ed9 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml @@ -15,6 +15,10 @@ name="not_found"> '[TEXT]' not found + + Resident wasn't found. + No one near -- cgit v1.2.3