summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormaksymsproductengine <maksymsproductengine@lindenlab.com>2013-12-04 20:28:10 +0200
committermaksymsproductengine <maksymsproductengine@lindenlab.com>2013-12-04 20:28:10 +0200
commit69569df61c9e59eb50415a4ac7695426613afdc4 (patch)
tree84e36891aa6c8e5e46957c0f7455509b27b6f605 /indra
parentab687d3d21453ec4db88ccd29d4bc2993abb24e4 (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 cbd844cdac..3dcf7cd8aa 100755
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -608,6 +608,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 d8c1ab7ef5..1750551395 100755
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -232,6 +232,8 @@ public:
BOOL isRoleDataComplete() { return mRoleDataComplete; }
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 ae217958f0..a0ca82da46 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)
@@ -495,6 +497,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;
}