From cf9239cabcf7999a2d2393bd4bdb6fc08e27c09c Mon Sep 17 00:00:00 2001 From: Monroe Williams Date: Thu, 1 Oct 2009 02:35:53 +0000 Subject: svn merge -r 134922:134973 svn+ssh://svn.lindenlab.com/svn/linden/branches/media-on-a-prim/moap-7 Merging branches/media-on-a-prim/moap-7 down to viewer-2.0. --- indra/newview/lltool.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'indra/newview/lltool.cpp') 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) -- cgit v1.2.3