summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-07-02 15:18:46 +0300
committermaxim_productengine <mnikolenko@productengine.com>2018-07-02 15:18:46 +0300
commit00ae3be19f5f666b37c21d4b215e5158692a7cfd (patch)
tree01899cea049bc4da8a974e3f8c1c51c92aa3ae69 /indra
parent522f0db9f5eeae1fbe001a05f4a958fb1e56a8f1 (diff)
MAINT-8718 FIXED EAM can't add or remove agent to or from Allowed, Banned list for All Estates on the first try
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterregioninfo.cpp54
-rw-r--r--indra/newview/llfloaterregioninfo.h7
2 files changed, 52 insertions, 9 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 64e621d4cc..a931351feb 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -121,6 +121,18 @@ public:
const sparam_t& strings);
};
+class LLDispatchSetEstateAccess : public LLDispatchHandler
+{
+public:
+ LLDispatchSetEstateAccess() {}
+ virtual ~LLDispatchSetEstateAccess() {}
+ virtual bool operator()(
+ const LLDispatcher* dispatcher,
+ const std::string& key,
+ const LLUUID& invoice,
+ const sparam_t& strings);
+};
+
class LLDispatchSetEstateExperience : public LLDispatchHandler
{
public:
@@ -1541,6 +1553,10 @@ void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch)
static LLDispatchEstateUpdateInfo estate_update_info;
dispatch.addHandler(name, &estate_update_info);
+ name.assign("setaccess");
+ static LLDispatchSetEstateAccess set_access;
+ dispatch.addHandler(name, &set_access);
+
name.assign("setexperience");
static LLDispatchSetEstateExperience set_experience;
dispatch.addHandler(name, &set_experience);
@@ -2315,6 +2331,21 @@ bool LLDispatchEstateUpdateInfo::operator()(
return true;
}
+bool LLDispatchSetEstateAccess::operator()(
+ const LLDispatcher* dispatcher,
+ const std::string& key,
+ const LLUUID& invoice,
+ const sparam_t& strings)
+{
+ LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
+ if (panel && panel->getPendingUpdate())
+ {
+ panel->setPendingUpdate(false);
+ panel->updateLists();
+ }
+ return true;
+}
+
LLSD LLDispatchSetEstateExperience::getIDs( sparam_t::const_iterator it, sparam_t::const_iterator end, S32 count )
{
LLSD idList = LLSD::emptyArray();
@@ -3222,8 +3253,9 @@ void LLPanelRegionExperiences::itemChanged( U32 event_type, const LLUUID& id )
}
-
-
+LLPanelEstateAccess::LLPanelEstateAccess()
+: LLPanelRegionInfo(), mPendingUpdate(false)
+{}
BOOL LLPanelEstateAccess::postBuild()
{
@@ -3771,7 +3803,13 @@ bool LLPanelEstateAccess::accessCoreConfirm(const LLSD& notification, const LLSD
iter++)
{
if (iter + 1 != end_it)
+ {
flags |= ESTATE_ACCESS_NO_REPLY;
+ }
+ else
+ {
+ flags &= ~ESTATE_ACCESS_NO_REPLY;
+ }
const LLUUID id = iter->asUUID();
if (((U32)notification["payload"]["operation"].asInteger() & ESTATE_ACCESS_BANNED_AGENT_ADD)
@@ -3795,6 +3833,11 @@ bool LLPanelEstateAccess::accessCoreConfirm(const LLSD& notification, const LLSD
names += av_name.getCompleteName();
}
}
+ LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
+ if (panel)
+ {
+ panel->setPendingUpdate(true);
+ }
if (!names.empty()) // show the conirmation
{
@@ -3869,13 +3912,6 @@ void LLPanelEstateAccess::sendEstateAccessDelta(U32 flags, const LLUUID& agent_o
msg->addString("Parameter", buf);
gAgent.sendReliableMessage();
-
-
- LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
- if (panel)
- {
- panel->updateLists();
- }
}
void LLPanelEstateAccess::updateChild(LLUICtrl* child_ctrl)
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index 20ba3a7d9c..941c81fbec 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -488,12 +488,17 @@ class LLPanelEstateAccess : public LLPanelRegionInfo
LOG_CLASS(LLPanelEnvironmentInfo);
public:
+ LLPanelEstateAccess();
+
virtual BOOL postBuild();
virtual void updateChild(LLUICtrl* child_ctrl);
void updateControls(LLViewerRegion* region);
void updateLists();
+ void setPendingUpdate(bool pending) { mPendingUpdate = pending; }
+ bool getPendingUpdate() { return mPendingUpdate; }
+
private:
void onClickAddAllowedAgent();
void onClickRemoveAllowedAgent();
@@ -523,6 +528,8 @@ private:
static void sendEstateAccessDelta(U32 flags, const LLUUID& agent_id);
static void requestEstateGetAccessCoro(std::string url);
+
+ bool mPendingUpdate;
};
#endif