summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormaksymsproductengine <maksymsproductengine@lindenlab.com>2014-05-29 03:24:13 +0300
committermaksymsproductengine <maksymsproductengine@lindenlab.com>2014-05-29 03:24:13 +0300
commitefc9422d1b87f2ccf191acde107652102ebf95d0 (patch)
tree7f6dab4179a9a9cd90fa4e58eb83c5b55bbb745f /indra
parente10d5238d651f46b6efbf6eb5dbee3e0a755adec (diff)
MAINT-3351 FIXED Misleading failure message when user is successfully removed from a group's Owners role
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llgroupmgr.cpp5
-rwxr-xr-xindra/newview/llgroupmgr.h2
-rwxr-xr-xindra/newview/llpanelgroup.cpp18
3 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 83ce2b0483..081f47df41 100755
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -611,6 +611,11 @@ void LLGroupMgrGroupData::recalcAgentPowers(const LLUUID& agent_id)
}
}
+bool LLGroupMgrGroupData::isSingleMemberNotOwner()
+{
+ return mMembers.size() == 1 && !mMembers.begin()->second->isOwner();
+}
+
bool packRoleUpdateMessageBlock(LLMessageSystem* msg,
const LLUUID& group_id,
const LLUUID& role_id,
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index 9e1c1eec90..2b4c9700be 100755
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -254,6 +254,8 @@ public:
bool isRoleMemberDataComplete() { return mRoleMemberDataComplete; }
bool isGroupPropertiesDataComplete() { return mGroupPropertiesDataComplete; }
+ bool isSingleMemberNotOwner();
+
F32 getAccessTime() const { return mAccessTime; }
void setAccessed();
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index bf332d1ca7..f4aab6bd4e 100755
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -49,6 +49,7 @@
#include "llpanelgroupnotices.h"
#include "llpanelgroupgeneral.h"
+#include "llpanelgrouproles.h"
#include "llaccordionctrltab.h"
#include "llaccordionctrl.h"
@@ -275,6 +276,7 @@ void LLPanelGroup::onBtnApply(void* user_data)
{
LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
self->apply();
+ self->refreshData();
}
void LLPanelGroup::onBtnGroupCallClicked(void* user_data)
@@ -497,6 +499,22 @@ bool LLPanelGroup::apply(LLPanelGroupTab* tab)
{
//we skip refreshing group after ew manually apply changes since its very annoying
//for those who are editing group
+
+ LLPanelGroupRoles * roles_tab = dynamic_cast<LLPanelGroupRoles*>(tab);
+ if (roles_tab)
+ {
+ LLGroupMgr* gmgrp = LLGroupMgr::getInstance();
+ LLGroupMgrGroupData* gdatap = gmgrp->getGroupData(roles_tab->getGroupID());
+
+ // allow refresh only for one specific case:
+ // there is only one member in group and it is not owner
+ // it's a wrong situation and need refresh panels from server
+ if (gdatap && gdatap->isSingleMemberNotOwner())
+ {
+ return true;
+ }
+ }
+
mSkipRefresh = TRUE;
return true;
}