MAINT-8880 Added god mode callback/update to the Region/Estate floater

meow-7.2.2
AndreyL ProductEngine 2018-07-24 23:44:24 +03:00
parent 5b9ab1b7bf
commit 7cc989d839
2 changed files with 24 additions and 5 deletions

View File

@ -276,11 +276,6 @@ void LLFloaterRegionInfo::onOpen(const LLSD& key)
requestRegionInfo();
requestMeshRezInfo();
LLPanelEstateAccess* panel_access = LLFloaterRegionInfo::getPanelAccess();
if (panel_access)
{
panel_access->updateLists();
}
}
// static
@ -713,6 +708,11 @@ void LLPanelRegionInfo::disableButton(const std::string& btn_name)
void LLPanelRegionInfo::initCtrl(const std::string& name)
{
getChild<LLUICtrl>(name)->setCommitCallback(boost::bind(&LLPanelRegionInfo::onChangeAnything, this));
if (!mGodLevelChangeSlot.connected())
{
mGodLevelChangeSlot = gAgent.registerGodLevelChanageListener(boost::bind(&LLPanelRegionInfo::onGodLevelChange, this, _1));
}
}
void LLPanelRegionInfo::onClickManageTelehub()
@ -721,6 +721,11 @@ void LLPanelRegionInfo::onClickManageTelehub()
LLFloaterReg::showInstance("telehubs");
}
void LLPanelRegionInfo::onGodLevelChange(U8 god_level)
{
refreshFromRegion(gAgent.getRegion());
}
/////////////////////////////////////////////////////////////////////////////
// LLPanelRegionGeneralInfo
//
@ -4109,3 +4114,9 @@ void LLPanelEstateAccess::searchAgent(LLNameListCtrl* listCtrl, const std::strin
}
}
bool LLPanelEstateAccess::refreshFromRegion(LLViewerRegion* region)
{
updateLists();
return true;
}

View File

@ -29,6 +29,7 @@
#define LL_LLFLOATERREGIONINFO_H
#include <vector>
#include "llagent.h"
#include "llassettype.h"
#include "llfloater.h"
#include "llhost.h"
@ -163,8 +164,13 @@ protected:
const LLUUID& invoice,
const strings_t& strings);
void onGodLevelChange(U8 god_level);
// member data
LLHost mHost;
private:
LLAgent::god_level_change_slot_t mGodLevelChangeSlot;
};
/////////////////////////////////////////////////////////////////////////////
@ -499,6 +505,8 @@ public:
void setPendingUpdate(bool pending) { mPendingUpdate = pending; }
bool getPendingUpdate() { return mPendingUpdate; }
virtual bool refreshFromRegion(LLViewerRegion* region);
private:
void onClickAddAllowedAgent();
void onClickRemoveAllowedAgent();