summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgrouproles.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2017-08-16 15:43:58 -0400
committerOz Linden <oz@lindenlab.com>2017-08-16 15:43:58 -0400
commit01e0b78c595e346bef4e771f9580006dd895367c (patch)
tree90160c9edb07baa4fcfd022082608f96b1bfdc06 /indra/newview/llpanelgrouproles.cpp
parent2368c44a8e2b031e5a8ac199923a016915cfe96a (diff)
parentcf865bb5962a85e2da3414468d6a99ecb5423f97 (diff)
merge changes for DRTVWR-439
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()