From 7ee5ee3dfdda7809c1ff3c40d6de2f01e5e207aa Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 3 Jul 2018 14:22:15 +0300 Subject: MAINT-8582 FIXED The message "Group is already in the list" is not displayed --- indra/newview/llfloaterregioninfo.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterregioninfo.cpp') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index a931351feb..9f7fa82529 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -3463,6 +3463,20 @@ void LLPanelEstateAccess::onClickRemoveEstateManager() // Special case callback for groups, since it has different callback format than names void LLPanelEstateAccess::addAllowedGroup2(LLUUID id) { + LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess(); + if (panel) + { + LLNameListCtrl* group_list = panel->getChild("allowed_group_name_list"); + LLScrollListItem* item = group_list->getNameItemByAgentId(id); + if (item) + { + LLSD args; + args["GROUP"] = item->getColumn(0)->getValue().asString(); + LLNotificationsUtil::add("GroupIsAlreadyInList", args); + return; + } + } + LLSD payload; payload["operation"] = (S32)ESTATE_ACCESS_ALLOWED_GROUP_ADD; payload["dialog_name"] = "EstateAllowedGroupAdd"; @@ -4019,7 +4033,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url) for (LLSD::array_const_iterator it = result["AllowedGroups"].beginArray(); it != result["AllowedGroups"].endArray(); ++it) { LLUUID id = (*it)["id"].asUUID(); - allowed_group_name_list->addNameItem(id); + allowed_group_name_list->addGroupNameItem(id); } allowed_group_name_list->sortByName(TRUE); } -- cgit v1.2.3