From 873543bd88e1461ffadbc95ee215a1654e813261 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 2 Apr 2014 13:06:53 +0300 Subject: MAINT-2536 FIXED Ignore selectTool( gGrabTransientTool ) if mouse down is handled in mouselook and mouse up event is not handled in this mode. --- indra/newview/lltoolgrab.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltoolgrab.cpp') diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index 9907da0f0e..ff544f1e84 100755 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -83,6 +83,7 @@ LLToolGrab::LLToolGrab( LLToolComposite* composite ) mLastFace(0), mSpinGrabbing( FALSE ), mSpinRotation(), + mClickedInMouselook( FALSE ), mHideBuildHighlight(FALSE) { } @@ -136,6 +137,7 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask) // can grab transparent objects (how touch event propagates, scripters rely on this) gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE); } + mClickedInMouselook = gAgentCamera.cameraMouselook(); return TRUE; } @@ -926,13 +928,21 @@ BOOL LLToolGrab::handleMouseUp(S32 x, S32 y, MASK mask) { setMouseCapture( FALSE ); } + mMode = GRAB_INACTIVE; - // HACK: Make some grabs temporary - if (gGrabTransientTool) + if(mClickedInMouselook && !gAgentCamera.cameraMouselook()) { - gBasicToolset->selectTool( gGrabTransientTool ); - gGrabTransientTool = NULL; + mClickedInMouselook = FALSE; + } + else + { + // HACK: Make some grabs temporary + if (gGrabTransientTool) + { + gBasicToolset->selectTool( gGrabTransientTool ); + gGrabTransientTool = NULL; + } } //gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject")); -- cgit v1.2.3 From 3686dc3e37511009be02b61edcd483cb9a032b1b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 16 Jun 2014 20:38:43 +0300 Subject: MAINT-3634 FIXED After right-clicking another avatars nametag or avatar then pressing the "Alt" key, most options in the dropdown menu will no longer function. --- indra/newview/lltoolgrab.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/lltoolgrab.cpp') diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index 9ac84e0066..fa6694b93b 100755 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -56,6 +56,7 @@ #include "llviewerregion.h" #include "llvoavatarself.h" #include "llworld.h" +#include "llmenugl.h" const S32 SLOP_DIST_SQ = 4; @@ -98,6 +99,8 @@ void LLToolGrab::handleSelect() { // viewer can crash during startup if we don't check. gFloaterTools->setStatusText("grab"); + // in case we start from tools floater, we count any selection as valid + mValidSelection = gFloaterTools->getVisible(); } gGrabBtnVertical = FALSE; gGrabBtnSpin = FALSE; @@ -110,6 +113,14 @@ void LLToolGrab::handleDeselect() setMouseCapture( FALSE ); } + // Make sure that temporary(invalid) selection won't pass anywhere except pie tool. + MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0; + if (!mValidSelection && (override_mask != MASK_NONE || (gFloaterTools && gFloaterTools->getVisible()))) + { + LLMenuGL::sMenuContainer->hideMenus(); + LLSelectMgr::getInstance()->validateSelection(); + } + } BOOL LLToolGrab::handleDoubleClick(S32 x, S32 y, MASK mask) -- cgit v1.2.3