diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-09-18 11:46:36 +0300 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-09-18 11:46:36 +0300 |
commit | c1fe3a3ed6aca0e0439a4f0d1116a31e9999a495 (patch) | |
tree | 2cbd26b89dfaae1b5ff699c14daee652ba3eae39 /indra/newview | |
parent | ac23d948a483d9194c7d0daef440521c9f4b4b90 (diff) |
MAINT-4433 FIXED Don't start changing scale on first click.
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llmanipscale.cpp | 14 | ||||
-rwxr-xr-x | indra/newview/llmanipscale.h | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 2810941d83..cb505c9d4c 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -352,6 +352,10 @@ BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) updateSnapGuides(bbox); + mFirstClickX = x; + mFirstClickY = y; + mIsFirstClick = true; + mDragStartPointGlobal = gAgent.getPosGlobalFromAgent(box_corner_agent); mDragStartCenterGlobal = gAgent.getPosGlobalFromAgent(box_center_agent); LLVector3 far_corner_agent = bbox.localToAgent( unitVectorToLocalBBoxExtent( -1.f * partToUnitVector( mManipPart ), bbox ) ); @@ -415,7 +419,15 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask) } else { - drag( x, y ); + if((mFirstClickX != x) || (mFirstClickY != y)) + { + mIsFirstClick = false; + } + + if(!mIsFirstClick) + { + drag( x, y ); + } } LL_DEBUGS("UserInput") << "hover handled by LLManipScale (active)" << LL_ENDL; } diff --git a/indra/newview/llmanipscale.h b/indra/newview/llmanipscale.h index 7cc3c99810..e93b3d4f83 100755 --- a/indra/newview/llmanipscale.h +++ b/indra/newview/llmanipscale.h @@ -172,6 +172,9 @@ private: ESnapRegimes mSnapRegime; //<! Which, if any, snap regime the cursor is currently residing in. F32 mManipulatorScales[NUM_MANIPULATORS]; F32 mBoxHandleSize[NUM_MANIPULATORS]; // The size of the handles at the corners of the bounding box + S32 mFirstClickX; + S32 mFirstClickY; + bool mIsFirstClick; }; #endif // LL_MANIPSCALE_H |