diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-05-31 12:22:47 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-05-31 12:22:47 -0700 |
commit | 938f42ded789dd70b31820d29694256cec3a1572 (patch) | |
tree | 9f3c16e631e2fc2870cc3142311f2a538f8998e4 /indra/newview/llfloaterpathfindingobjects.cpp | |
parent | d00192c9cbeaace7c1b7c09bfb86a5b5d8dff458 (diff) |
Reloading the the pathfinding object floaters when the god level is changed.
Diffstat (limited to 'indra/newview/llfloaterpathfindingobjects.cpp')
-rw-r--r-- | indra/newview/llfloaterpathfindingobjects.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp index e8d80c09d8..3f6c4983d5 100644 --- a/indra/newview/llfloaterpathfindingobjects.cpp +++ b/indra/newview/llfloaterpathfindingobjects.cpp @@ -78,11 +78,21 @@ void LLFloaterPathfindingObjects::onOpen(const LLSD &pKey) mRegionBoundaryCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLFloaterPathfindingObjects::onRegionBoundaryCrossed, this)); } + if (!mGodLevelChangeSlot.connected()) + { + mGodLevelChangeSlot = gAgent.registerGodLevelChanageListener(boost::bind(&LLFloaterPathfindingObjects::onGodLevelChange, this, _1)); + } + requestGetObjects(); } void LLFloaterPathfindingObjects::onClose(bool pIsAppQuitting) { + if (mGodLevelChangeSlot.connected()) + { + mGodLevelChangeSlot.disconnect(); + } + if (mRegionBoundaryCrossingSlot.connected()) { mRegionBoundaryCrossingSlot.disconnect(); @@ -554,6 +564,11 @@ void LLFloaterPathfindingObjects::onRegionBoundaryCrossed() requestGetObjects(); } +void LLFloaterPathfindingObjects::onGodLevelChange(U8 pGodLevel) +{ + requestGetObjects(); +} + void LLFloaterPathfindingObjects::updateMessagingStatus() { std::string statusText(""); |