From b79c4e47a80e4e4aba01475cdd2e65cbaf6385a6 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Fri, 9 Dec 2022 07:44:27 +0200
Subject: [PATCH] SL-18776 Fix handling for an empty avatar list

---
 indra/newview/llfloateravatarpicker.cpp               | 11 ++++++-----
 .../xui/en/floater_inventory_item_properties.xml      |  1 -
 indra/newview/skins/default/xui/en/floater_tools.xml  |  1 -
 .../skins/default/xui/en/sidepanel_item_info.xml      |  1 -
 .../skins/default/xui/en/sidepanel_task_info.xml      |  1 -
 5 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 7cd2e0146ae..2422596f60a 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -680,7 +680,12 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
         // clear "Searching" label on first results
         search_results->deleteAllItems();
 
-        if (content.has("agents"))
+        if (content.has("failure_reason"))
+        {
+            getChild<LLScrollListCtrl>("SearchResults")->setCommentText(content["failure_reason"].asString());
+            getChildView("ok_btn")->setEnabled(false);
+        }
+        else
         {
             LLSD agents = content["agents"];
 
@@ -733,10 +738,6 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
                 search_results->setFocus(TRUE);
             }
         }
-        else if (content.has("failure_reason"))
-        {
-            getChild<LLScrollListCtrl>("SearchResults")->setCommentText(content["failure_reason"].asString());
-        }
 	}
 }
 
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
index 45e16c59ae3..850e1be372d 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
@@ -323,7 +323,6 @@
         follows="left|top"
         decimal_digits="0"
         increment="1"
-        control_name="Edit Cost"
         name="Edit Cost"
         label="Price:"
         label_width="100"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index ade79b8884a..d9b0ac00608 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -1140,7 +1140,6 @@ even though the user gets a free copy.
       decimal_digits="0"
       increment="1"
       left_pad="0"
-      control_name="Edit Cost"
       name="Edit Cost"
       label="L$"
       label_width="15"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
index ff7ea08251e..35d14251c75 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
@@ -450,7 +450,6 @@
         follows="left|top"
         decimal_digits="0"
         increment="1"
-        control_name="Edit Cost"
         name="Edit Cost"
         label="Price: L$"
         label_width="75"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index 1c9d750aa63..0b32215964b 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -454,7 +454,6 @@
         increment="1"
         top_pad="10"
         left="120"
-        control_name="Edit Cost"
         name="Edit Cost"
         label="Price: L$"
         label_width="73"				
-- 
GitLab