From 956c412aa431ccee80b7b9c8f0e224d5246af1f1 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Thu, 2 Jun 2016 15:09:09 +0300 Subject: MAINT-5207 Build: Snap to grid / Grid options broken, object snaps to incorrect Units FIXED - Decrase the minimal dev. pix. width to 3. That should be enought. - Remove the mouse down offset from the snapping algorithm. IMHO it shouldn't be here. Snapping should be right on the mosue pointer. --- indra/newview/llmanip.h | 4 ++-- indra/newview/llmaniptranslate.cpp | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmanip.h b/indra/newview/llmanip.h index 1fb05e047a..69881e8589 100644 --- a/indra/newview/llmanip.h +++ b/indra/newview/llmanip.h @@ -1,4 +1,4 @@ -/** +/** * @file llmanip.h * @brief LLManip class definition * @@ -37,7 +37,7 @@ class LLToolComposite; class LLVector3; class LLObjectSelection; -const S32 MIN_DIVISION_PIXEL_WIDTH = 9; +const S32 MIN_DIVISION_PIXEL_WIDTH = 3; class LLManip : public LLTool { diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index b4259a456c..3975d3980b 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -1,4 +1,4 @@ -/** +/** * @file llmaniptranslate.cpp * @brief LLManipTranslate class implementation * @@ -548,12 +548,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) if (off_axis_magnitude > mSnapOffsetMeters) { mInSnapRegime = TRUE; - LLVector3 mouse_down_offset(mDragCursorStartGlobal - mDragSelectionStartGlobal); LLVector3 cursor_snap_agent = gAgent.getPosAgentFromGlobal(cursor_point_snap_line); - if (!gSavedSettings.getBOOL("SnapToMouseCursor")) - { - cursor_snap_agent -= mouse_down_offset; - } F32 cursor_grid_dist = (cursor_snap_agent - mGridOrigin) * axis_f; -- cgit v1.2.3