diff options
-rw-r--r-- | indra/newview/llfloaterpathfindingconsole.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llpathfindingpathtool.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpathfindingpathtool.h | 4 |
3 files changed, 11 insertions, 9 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;
}
}
diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp index 6200586cf1..8147cb95d5 100644 --- a/indra/newview/llpathfindingpathtool.cpp +++ b/indra/newview/llpathfindingpathtool.cpp @@ -32,7 +32,7 @@ #include "llviewerwindow.h" #include "llviewercamera.h" #include "llpathfindingmanager.h" -#include "llpathinglib.h" +#include "LLPathingLib.h" #include <boost/function.hpp> #include <boost/signals2.hpp> diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index 80d3b4cceb..1e17b71bd3 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -30,7 +30,7 @@ #include "llsingleton.h"
#include "lltool.h"
-#include "llpathinglib.h"
+#include "LLPathingLib.h"
#include <boost/function.hpp>
#include <boost/signals2.hpp>
@@ -60,8 +60,6 @@ public: kCharacterTypeD
} ECharacterType;
- typedef
-
LLPathfindingPathTool();
virtual ~LLPathfindingPathTool();
|