summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llmaniprotate.cpp13
-rwxr-xr-xindra/newview/llselectmgr.cpp4
-rwxr-xr-xindra/newview/llselectmgr.h2
3 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index e917b0ae52..bc0cfa73d6 100755
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -749,17 +749,18 @@ void LLManipRotate::renderActiveRing( F32 radius, F32 width, const LLColor4& fro
void LLManipRotate::renderSnapGuides()
{
+ if (!gSavedSettings.getBOOL("SnapEnabled"))
+ {
+ 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;
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 577c336ac7..1a09b99e73 100755
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -1210,7 +1210,7 @@ void LLSelectMgr::setGridMode(EGridMode mode)
updateSelectionCenter();
}
-void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &scale)
+void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &scale, bool for_snap_guides)
{
mGridObjects.cleanupNodes();
@@ -1236,7 +1236,7 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &
else if (mGridMode == GRID_MODE_REF_OBJECT && first_grid_object && first_grid_object->mDrawable.notNull())
{
LLSelectNode *node = mSelectedObjects->findNode(first_grid_object);
- if (node)
+ if (!for_snap_guides && node)
{
mGridRotation = node->mSavedRotation;
}
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 87d25e3a8c..90f7fdfe13 100755
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -527,7 +527,7 @@ public:
void clearGridObjects();
void setGridMode(EGridMode mode);
EGridMode getGridMode() { return mGridMode; }
- void getGrid(LLVector3& origin, LLQuaternion& rotation, LLVector3 &scale);
+ void getGrid(LLVector3& origin, LLQuaternion& rotation, LLVector3 &scale, bool for_snap_guides = false);
BOOL getTEMode() { return mTEMode; }
void setTEMode(BOOL b) { mTEMode = b; }