summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-06-01 16:50:28 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-06-01 16:50:28 -0700
commitfb7c7043a467d0d6c2b741ca603b6b1c57a52ae9 (patch)
tree296b65d94ef4db670e892a3a5b2213ce4505a9bf /indra/newview
parent372391403d3a7ca3c67d7a6256ab3e4c44018bd0 (diff)
PATH-668: Eating the escape key in the pathfinding path tool to avoid certain bad behaviors.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpathfindingpathtool.cpp9
-rw-r--r--indra/newview/llpathfindingpathtool.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp
index 1e327a3ba7..bc5a265111 100644
--- a/indra/newview/llpathfindingpathtool.cpp
+++ b/indra/newview/llpathfindingpathtool.cpp
@@ -162,6 +162,15 @@ BOOL LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask)
return returnVal;
}
+BOOL LLPathfindingPathTool::handleKey(KEY pKey, MASK pMask)
+{
+ // Eat the escape key or else the camera tool will pick up and reset to default view. This,
+ // in turn, will cause some other methods to get called. And one of those methods will reset
+ // the current toolset back to the basic toolset. This means that the pathfinding path toolset
+ // will no longer be active, but typically with pathfinding path elements on screen.
+ return (pKey == KEY_ESCAPE);
+}
+
LLPathfindingPathTool::EPathStatus LLPathfindingPathTool::getPathStatus() const
{
EPathStatus status = kPathStatusUnknown;
diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h
index 0294111ccf..671f5bef95 100644
--- a/indra/newview/llpathfindingpathtool.h
+++ b/indra/newview/llpathfindingpathtool.h
@@ -77,6 +77,8 @@ public:
virtual BOOL handleHover(S32 pX, S32 pY, MASK pMask);
+ virtual BOOL handleKey(KEY pKey, MASK pMask);
+
EPathStatus getPathStatus() const;
F32 getCharacterWidth() const;