summaryrefslogtreecommitdiff
path: root/indra/newview/lltool.cpp
diff options
context:
space:
mode:
authorMark Palange (Mani) <palange@lindenlab.com>2009-10-01 18:19:45 -0700
committerMark Palange (Mani) <palange@lindenlab.com>2009-10-01 18:19:45 -0700
commitdde2153014cd7d7b8fa704f7067a41344bfbb1c2 (patch)
treef7633ccef179644660897c8bf3684abeda3545f8 /indra/newview/lltool.cpp
parent9b8b0571645f8b607ecc24221c807cc02a03692f (diff)
parent85ea690d47208f6dda020c8ff81021179fbdd0b8 (diff)
merge of latest lindenlab/svn-imports-viewer-20
Diffstat (limited to 'indra/newview/lltool.cpp')
-rw-r--r--indra/newview/lltool.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp
index ceb1358d1c..880d5d5e12 100644
--- a/indra/newview/lltool.cpp
+++ b/indra/newview/lltool.cpp
@@ -67,18 +67,20 @@ LLTool::~LLTool()
BOOL LLTool::handleAnyMouseClick(S32 x, S32 y, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down)
{
- // This is necessary to force clicks in the world to cause edit
- // boxes that might have keyboard focus to relinquish it, and hence
- // cause a commit to update their value. JC
- if (down)
+ BOOL result = LLMouseHandler::handleAnyMouseClick(x, y, mask, clicktype, down);
+
+ // This behavior was moved here from LLViewerWindow::handleAnyMouseClick, so it can be selectively overridden by LLTool subclasses.
+ if(down && result)
{
+ // This is necessary to force clicks in the world to cause edit
+ // boxes that might have keyboard focus to relinquish it, and hence
+ // cause a commit to update their value. JC
gFocusMgr.setKeyboardFocus(NULL);
}
-
- return LLMouseHandler::handleAnyMouseClick(x, y, mask, clicktype, down);
+
+ return result;
}
-
BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (gDebugClicks)