Restore Access Management lists' sort orders after populating them
This commit is contained in:
@@ -2538,6 +2538,7 @@ void LLPanelLandAccess::refresh()
|
||||
if (mListAccess)
|
||||
{
|
||||
// Clear the sort order so we don't re-sort on every add.
|
||||
const auto order = mListAccess->getSortOrder();
|
||||
mListAccess->clearSortOrder();
|
||||
mListAccess->deleteAllItems();
|
||||
S32 count = parcel->mAccessList.size();
|
||||
@@ -2568,13 +2569,14 @@ void LLPanelLandAccess::refresh()
|
||||
}
|
||||
mListAccess->addElement(item);
|
||||
}
|
||||
mListAccess->sortByName(TRUE);
|
||||
mListAccess->setSortOrder(order);
|
||||
}
|
||||
|
||||
// Ban List
|
||||
if(mListBanned)
|
||||
{
|
||||
// Clear the sort order so we don't re-sort on every add.
|
||||
const auto order = mListBanned->getSortOrder();
|
||||
mListBanned->clearSortOrder();
|
||||
mListBanned->deleteAllItems();
|
||||
S32 count = parcel->mBanList.size();
|
||||
@@ -2605,7 +2607,7 @@ void LLPanelLandAccess::refresh()
|
||||
}
|
||||
mListBanned->addElement(item);
|
||||
}
|
||||
mListBanned->sortByName(TRUE);
|
||||
mListBanned->setSortOrder(order);
|
||||
}
|
||||
|
||||
if(parcel->getRegionDenyAnonymousOverride())
|
||||
|
||||
@@ -4139,6 +4139,7 @@ void LLPanelEstateAccess::onEstateAccessReceived(const LLSD& result)
|
||||
std::string msg = LLTrans::getString("RegionInfoAllowedResidents", args);
|
||||
panel->getChild<LLUICtrl>("allow_resident_label")->setValue(LLSD(msg));
|
||||
|
||||
const auto order = allowed_agent_name_list->getSortOrder();
|
||||
allowed_agent_name_list->clearSortOrder();
|
||||
allowed_agent_name_list->deleteAllItems();
|
||||
for (LLSD::array_const_iterator it = result["AllowedAgents"].beginArray(); it != result["AllowedAgents"].endArray(); ++it)
|
||||
@@ -4146,7 +4147,7 @@ void LLPanelEstateAccess::onEstateAccessReceived(const LLSD& result)
|
||||
LLUUID id = (*it)["id"].asUUID();
|
||||
allowed_agent_name_list->addNameItem(id);
|
||||
}
|
||||
allowed_agent_name_list->sortByName(TRUE);
|
||||
allowed_agent_name_list->setSortOrder(order);
|
||||
}
|
||||
|
||||
LLNameListCtrl* banned_agent_name_list = panel->getChild<LLNameListCtrl>("banned_avatar_name_list");
|
||||
@@ -4158,6 +4159,7 @@ void LLPanelEstateAccess::onEstateAccessReceived(const LLSD& result)
|
||||
std::string msg = LLTrans::getString("RegionInfoBannedResidents", args);
|
||||
panel->getChild<LLUICtrl>("ban_resident_label")->setValue(LLSD(msg));
|
||||
|
||||
const auto order = banned_agent_name_list->getSortOrder();
|
||||
banned_agent_name_list->clearSortOrder();
|
||||
banned_agent_name_list->deleteAllItems();
|
||||
static const auto na = LLTrans::getString("na");
|
||||
@@ -4190,7 +4192,7 @@ void LLPanelEstateAccess::onEstateAccessReceived(const LLSD& result)
|
||||
|
||||
banned_agent_name_list->addElement(item);
|
||||
}
|
||||
banned_agent_name_list->sortByName(TRUE);
|
||||
banned_agent_name_list->setSortOrder(order);
|
||||
}
|
||||
|
||||
LLNameListCtrl* allowed_group_name_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list");
|
||||
@@ -4202,6 +4204,7 @@ void LLPanelEstateAccess::onEstateAccessReceived(const LLSD& result)
|
||||
std::string msg = LLTrans::getString("RegionInfoAllowedGroups", args);
|
||||
panel->getChild<LLUICtrl>("allow_group_label")->setValue(LLSD(msg));
|
||||
|
||||
const auto order = allowed_group_name_list->getSortOrder();
|
||||
allowed_group_name_list->clearSortOrder();
|
||||
allowed_group_name_list->deleteAllItems();
|
||||
for (LLSD::array_const_iterator it = result["AllowedGroups"].beginArray(); it != result["AllowedGroups"].endArray(); ++it)
|
||||
@@ -4209,7 +4212,7 @@ void LLPanelEstateAccess::onEstateAccessReceived(const LLSD& result)
|
||||
LLUUID id = (*it)["id"].asUUID();
|
||||
allowed_group_name_list->addGroupNameItem(id);
|
||||
}
|
||||
allowed_group_name_list->sortByName(TRUE);
|
||||
allowed_group_name_list->setSortOrder(order);
|
||||
}
|
||||
|
||||
LLNameListCtrl* estate_manager_name_list = panel->getChild<LLNameListCtrl>("estate_manager_name_list");
|
||||
@@ -4221,6 +4224,7 @@ void LLPanelEstateAccess::onEstateAccessReceived(const LLSD& result)
|
||||
std::string msg = LLTrans::getString("RegionInfoEstateManagers", args);
|
||||
panel->getChild<LLUICtrl>("estate_manager_label")->setValue(LLSD(msg));
|
||||
|
||||
const auto order = estate_manager_name_list->getSortOrder();
|
||||
estate_manager_name_list->clearSortOrder();
|
||||
estate_manager_name_list->deleteAllItems();
|
||||
for (LLSD::array_const_iterator it = result["Managers"].beginArray(); it != result["Managers"].endArray(); ++it)
|
||||
@@ -4228,7 +4232,7 @@ void LLPanelEstateAccess::onEstateAccessReceived(const LLSD& result)
|
||||
LLUUID id = (*it)["agent_id"].asUUID();
|
||||
estate_manager_name_list->addNameItem(id);
|
||||
}
|
||||
estate_manager_name_list->sortByName(TRUE);
|
||||
estate_manager_name_list->setSortOrder(order);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
<panel
|
||||
background_opaque="true"
|
||||
background_visible="true"
|
||||
bg_alpha_color="DkGray"
|
||||
bg_opaque_color="DkGray"
|
||||
bottom="-1"
|
||||
follows="all"
|
||||
label="Estate Managers"
|
||||
@@ -79,6 +77,7 @@
|
||||
draw_heading="false"
|
||||
name="estate_manager_name_list"
|
||||
menu_num="0"
|
||||
sort_column="0"
|
||||
name_system="LandManagementNameSystem"
|
||||
bottom_delta="0"
|
||||
width="498">
|
||||
@@ -113,8 +112,6 @@
|
||||
<panel
|
||||
background_opaque="true"
|
||||
background_visible="true"
|
||||
bg_alpha_color="DkGray"
|
||||
bg_opaque_color="DkGray"
|
||||
bottom="-1"
|
||||
follows="all"
|
||||
label="Allowed"
|
||||
@@ -185,6 +182,7 @@
|
||||
draw_heading="false"
|
||||
name="allowed_avatar_name_list"
|
||||
menu_num="0"
|
||||
sort_column="0"
|
||||
name_system="LandManagementNameSystem"
|
||||
bottom_delta="0"
|
||||
width="498">
|
||||
@@ -227,8 +225,6 @@
|
||||
<panel
|
||||
background_opaque="true"
|
||||
background_visible="true"
|
||||
bg_alpha_color="DkGray"
|
||||
bg_opaque_color="DkGray"
|
||||
bottom="-1"
|
||||
follows="all"
|
||||
label="Allowed Groups"
|
||||
@@ -339,8 +335,6 @@
|
||||
<panel
|
||||
background_opaque="true"
|
||||
background_visible="true"
|
||||
bg_alpha_color="DkGray"
|
||||
bg_opaque_color="DkGray"
|
||||
bottom="-1"
|
||||
follows="all"
|
||||
label="Banned"
|
||||
@@ -411,6 +405,7 @@
|
||||
draw_heading="true"
|
||||
name="banned_avatar_name_list"
|
||||
menu_num="0"
|
||||
sort_column="0"
|
||||
name_system="LandManagementNameSystem"
|
||||
bottom_delta="0"
|
||||
width="498">
|
||||
|
||||
Reference in New Issue
Block a user