From c1fe3a3ed6aca0e0439a4f0d1116a31e9999a495 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 18 Sep 2014 11:46:36 +0300 Subject: MAINT-4433 FIXED Don't start changing scale on first click. --- indra/newview/llmanipscale.cpp | 14 +++++++++++++- indra/newview/llmanipscale.h | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'indra') 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; //