summaryrefslogtreecommitdiff
path: root/indra/newview/llmaniprotate.cpp
diff options
context:
space:
mode:
authorGlenn Glazer <coyot@lindenlab.com>2016-03-08 13:32:28 -0800
committerGlenn Glazer <coyot@lindenlab.com>2016-03-08 13:32:28 -0800
commitec683bb9cf6688633d8bc7ecbdf72f7cbc14d349 (patch)
tree59ada405958cd7764a96cfa35ccc89e83706b5af /indra/newview/llmaniprotate.cpp
parentdaf8b882a12cf903d180f6303065d7b83f7a1958 (diff)
parent5a5c023e291990a463b1a91846ce82c70da8daab (diff)
pull from trunk
Diffstat (limited to 'indra/newview/llmaniprotate.cpp')
-rwxr-xr-xindra/newview/llmaniprotate.cpp16
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;
}