diff options
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index da90108186..38fa3bd153 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -276,6 +276,18 @@ void LLFloaterRegionInfo::onOpen(const LLSD& key) requestRegionInfo(); requestMeshRezInfo(); + if (!mGodLevelChangeSlot.connected()) + { + mGodLevelChangeSlot = gAgent.registerGodLevelChanageListener(boost::bind(&LLFloaterRegionInfo::onGodLevelChange, this, _1)); + } +} + +void LLFloaterRegionInfo::onClose(bool app_quitting) +{ + if (mGodLevelChangeSlot.connected()) + { + mGodLevelChangeSlot.disconnect(); + } } // static @@ -588,6 +600,15 @@ void LLFloaterRegionInfo::disableTopButtons() getChildView("top_scripts_btn")->setEnabled(false); } +void LLFloaterRegionInfo::onGodLevelChange(U8 god_level) +{ + LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info"); + if (floater && floater->getVisible()) + { + refreshFromRegion(gAgent.getRegion()); + } +} + ///---------------------------------------------------------------------------- /// Local class implementation ///---------------------------------------------------------------------------- @@ -708,11 +729,6 @@ 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,11 +737,6 @@ void LLPanelRegionInfo::onClickManageTelehub() LLFloaterReg::showInstance("telehubs"); } -void LLPanelRegionInfo::onGodLevelChange(U8 god_level) -{ - refreshFromRegion(gAgent.getRegion()); -} - ///////////////////////////////////////////////////////////////////////////// // LLPanelRegionGeneralInfo // @@ -4117,6 +4128,6 @@ void LLPanelEstateAccess::searchAgent(LLNameListCtrl* listCtrl, const std::strin bool LLPanelEstateAccess::refreshFromRegion(LLViewerRegion* region) { updateLists(); - return true; + return LLPanelRegionInfo::refreshFromRegion(region); } |