summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-04-10 11:09:28 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-04-10 11:09:28 -0700
commitdf47f35d8fce6eb84ca4b26112e7af506616f4a5 (patch)
tree20dd71e87210dddd8840fe5ce863aa78ea8e411b /indra/newview
parent65980a62abf6a4d6fb0d64e26febe40396f02d24 (diff)
Altering how the toolset is swapped into and out-of test path mode.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index 7941fd52af..afbf589e5e 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -891,17 +891,21 @@ void LLFloaterPathfindingConsole::setAgentState(LLPathfindingManager::EAgentStat
void LLFloaterPathfindingConsole::switchIntoTestPathMode()
{
llassert(mPathfindingToolset != NULL);
- llassert(mSavedToolset == NULL);
- mSavedToolset = LLToolMgr::getInstance()->getCurrentToolset();
- LLToolMgr::getInstance()->setCurrentToolset(mPathfindingToolset);
+ LLToolMgr *toolMgrInstance = LLToolMgr::getInstance();
+ if (toolMgrInstance->getCurrentToolset() != mPathfindingToolset)
+ {
+ mSavedToolset = toolMgrInstance->getCurrentToolset();
+ toolMgrInstance->setCurrentToolset(mPathfindingToolset);
+ }
}
void LLFloaterPathfindingConsole::switchOutOfTestPathMode()
{
llassert(mPathfindingToolset != NULL);
- if (mSavedToolset != NULL)
+ LLToolMgr *toolMgrInstance = LLToolMgr::getInstance();
+ if (toolMgrInstance->getCurrentToolset() == mPathfindingToolset)
{
- LLToolMgr::getInstance()->setCurrentToolset(mSavedToolset);
+ toolMgrInstance->setCurrentToolset(mSavedToolset);
mSavedToolset = NULL;
}
}