summaryrefslogtreecommitdiff
path: root/indra/newview/llmaniprotate.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-01-15 16:55:04 -0500
committerOz Linden <oz@lindenlab.com>2016-01-15 16:55:04 -0500
commitbc22e587439a2822e5228508e7a4a1e2ec0121c5 (patch)
tree442540d0c2760617a2c0cf0cb9ba1973ab6fb298 /indra/newview/llmaniprotate.cpp
parent317644f5d575ecd4e734c9a5327f2a062ebf914a (diff)
parent5a5c023e291990a463b1a91846ce82c70da8daab (diff)
merge changes for 4.0.1-release
Diffstat (limited to 'indra/newview/llmaniprotate.cpp')
-rw-r--r--indra/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 100644
--- 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;
}