diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-01-15 16:42:39 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-01-15 16:42:39 -0500 |
commit | 3612d7d14b1e481402bb3d7cbfb552cd19a3fc0a (patch) | |
tree | f3dabe49f7953e24de207a6a0939da5539d5acca /indra/newview/llmaniprotate.cpp | |
parent | a6c8de97bbb2609d24e212672b192650aed91e1e (diff) | |
parent | 5a5c023e291990a463b1a91846ce82c70da8daab (diff) |
merge
Diffstat (limited to 'indra/newview/llmaniprotate.cpp')
-rwxr-xr-x | indra/newview/llmaniprotate.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index f172aa0955..ed40483029 100755 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -749,17 +749,19 @@ void LLManipRotate::renderActiveRing( F32 radius, F32 width, const LLColor4& fro void LLManipRotate::renderSnapGuides() { + static LLCachedControl<bool> snap_enabled(gSavedSettings, "SnapEnabled", true); + if (!snap_enabled) + { + return; + } + LLVector3 grid_origin; LLVector3 grid_scale; LLQuaternion grid_rotation; - LLVector3 constraint_axis = getConstraintAxis(); - LLSelectMgr::getInstance()->getGrid(grid_origin, grid_rotation, grid_scale); + LLSelectMgr::getInstance()->getGrid(grid_origin, grid_rotation, grid_scale, true); - if (!gSavedSettings.getBOOL("SnapEnabled")) - { - return; - } + LLVector3 constraint_axis = getConstraintAxis(); LLVector3 center = gAgent.getPosAgentFromGlobal( mRotationCenter ); LLVector3 cam_at_axis; @@ -1294,7 +1296,7 @@ LLVector3 LLManipRotate::getConstraintAxis() else { S32 axis_dir = mManipPart - LL_ROT_X; - if ((axis_dir >= 0) && (axis_dir < 3)) + if ((axis_dir >= LL_NO_PART) && (axis_dir < LL_Z_ARROW)) { axis.mV[axis_dir] = 1.f; } |