summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoolmgr.cpp')
-rw-r--r--indra/newview/lltoolmgr.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp
index cf3d15a12a..d52e0b4b80 100644
--- a/indra/newview/lltoolmgr.cpp
+++ b/indra/newview/lltoolmgr.cpp
@@ -357,22 +357,20 @@ void LLToolMgr::clearTransientTool()
}
-// The "gun tool", used for handling mouselook, captures the mouse and
-// locks it within the window. When the app loses focus we need to
-// release this locking.
void LLToolMgr::onAppFocusLost()
{
- mSavedTool = mBaseTool;
- mBaseTool = gToolNull;
+ if (mSelectedTool)
+ {
+ mSelectedTool->handleDeselect();
+ }
updateToolStatus();
}
void LLToolMgr::onAppFocusGained()
{
- if (mSavedTool)
+ if (mSelectedTool)
{
- mBaseTool = mSavedTool;
- mSavedTool = NULL;
+ mSelectedTool->handleSelect();
}
updateToolStatus();
}