diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-04-02 13:06:53 +0300 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-04-02 13:06:53 +0300 |
commit | 873543bd88e1461ffadbc95ee215a1654e813261 (patch) | |
tree | 018c5db28703ce0af4bb1d96c63e14c0518a4291 | |
parent | 4026a6a4d67d6e079e92b0973942a1f896ae496e (diff) |
MAINT-2536 FIXED Ignore selectTool( gGrabTransientTool ) if mouse down is handled in mouselook and mouse up event is not handled in this mode.
-rwxr-xr-x | indra/newview/lltoolgrab.cpp | 18 | ||||
-rwxr-xr-x | indra/newview/lltoolgrab.h | 2 |
2 files changed, 16 insertions, 4 deletions
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")); diff --git a/indra/newview/lltoolgrab.h b/indra/newview/lltoolgrab.h index 06a3b662c8..5107716aab 100755 --- a/indra/newview/lltoolgrab.h +++ b/indra/newview/lltoolgrab.h @@ -133,6 +133,8 @@ private: LLQuaternion mSpinRotation; BOOL mHideBuildHighlight; + + BOOL mClickedInMouselook; }; extern BOOL gGrabBtnVertical; |