MAINT-4433 FIXED Don't start changing scale on first click.

meow-7.2.2
Mnikolenko ProductEngine 2014-09-18 11:46:36 +03:00
parent ac23d948a4
commit c1fe3a3ed6
2 changed files with 16 additions and 1 deletions

View File

@ -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;
}

View File

@ -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