summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgrouproles.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2017-08-23 09:19:59 -0400
committerOz Linden <oz@lindenlab.com>2017-08-23 09:19:59 -0400
commitbcf5dc079a5dc9434b541a971e28315fa5cb9816 (patch)
tree16f6b186d704ca9682bcbfcb8aca1e29ef85b103 /indra/newview/llpanelgrouproles.cpp
parentfa53653e60f5761c157b76423b4449fe38788d8f (diff)
parent08cbed55ef5689fcc5a02dfb3b9afde15487036e (diff)
merge changes for 5.0.7-release
Diffstat (limited to 'indra/newview/llpanelgrouproles.cpp')
-rw-r--r--indra/newview/llpanelgrouproles.cpp46
1 files changed, 32 insertions, 14 deletions
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 8440e9ee50..66a0a1d4ad 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -494,6 +494,7 @@ void LLPanelGroupSubTab::setSearchFilter(const std::string& filter)
mSearchFilter = filter;
LLStringUtil::toLower(mSearchFilter);
update(GC_ALL);
+ onFilterChanged();
}
void LLPanelGroupSubTab::activate()
@@ -2471,12 +2472,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
//////////////////////////////////////////////////////////////////////////
- LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.find(role_id);
- U64 current_role_powers = GP_NO_POWERS;
- if (rit != gdatap->mRoles.end())
- {
- current_role_powers = ((*rit).second->getRoleData().mRolePowers);
- }
+ U64 current_role_powers = gdatap->getRolePowers(role_id);
if(isEnablingAbility)
{
@@ -2775,6 +2771,16 @@ void LLPanelGroupActionsSubTab::activate()
LLPanelGroupSubTab::activate();
update(GC_ALL);
+ mActionDescription->clear();
+ mActionList->deselectAllItems();
+ mActionList->deleteAllItems();
+ buildActionsList(mActionList,
+ GP_ALL_POWERS,
+ GP_ALL_POWERS,
+ NULL,
+ FALSE,
+ TRUE,
+ FALSE);
}
void LLPanelGroupActionsSubTab::deactivate()
@@ -2803,19 +2809,31 @@ void LLPanelGroupActionsSubTab::update(LLGroupChange gc)
if (mGroupID.isNull()) return;
- mActionList->deselectAllItems();
mActionMembers->deleteAllItems();
mActionRoles->deleteAllItems();
- mActionDescription->clear();
+ if(mActionList->hasSelectedItem())
+ {
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
+ if (gdatap && gdatap->isMemberDataComplete() && gdatap->isRoleDataComplete())
+ {
+ handleActionSelect();
+ }
+ }
+}
+
+void LLPanelGroupActionsSubTab::onFilterChanged()
+{
+ mActionDescription->clear();
+ mActionList->deselectAllItems();
mActionList->deleteAllItems();
buildActionsList(mActionList,
- GP_ALL_POWERS,
- GP_ALL_POWERS,
- NULL,
- FALSE,
- TRUE,
- FALSE);
+ GP_ALL_POWERS,
+ GP_ALL_POWERS,
+ NULL,
+ FALSE,
+ TRUE,
+ FALSE);
}
void LLPanelGroupActionsSubTab::handleActionSelect()