summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2015-09-03 19:21:49 +0300
committerruslantproductengine <ruslantproductengine@lindenlab.com>2015-09-03 19:21:49 +0300
commitbc8fe00b991522ea310efd2eac3af24a11a05964 (patch)
tree6861a93c78937b5328a2845028a180accf39393e
parent9cddfc5a0e89f94e56eed8cf49501f1d0cb35138 (diff)
MAINT-5268 (Rotating an object that's used as grid reference goes crazy)
-rwxr-xr-xindra/newview/llmaniprotate.cpp4
-rwxr-xr-xindra/newview/llselectmgr.cpp8
2 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index f172aa0955..aa520a728c 100755
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -591,7 +591,7 @@ void LLManipRotate::drag( S32 x, S32 y )
continue;
}
}
-
+
LLQuaternion new_rot = selectNode->mSavedRotation * mRotation;
std::vector<LLVector3>& child_positions = object->mUnselectedChildrenPositions ;
std::vector<LLQuaternion> child_rotations;
@@ -1294,7 +1294,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;
}
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 55bcb3dc65..49a7ab3280 100755
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -1235,7 +1235,13 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &
}
else if (mGridMode == GRID_MODE_REF_OBJECT && first_grid_object && first_grid_object->mDrawable.notNull())
{
- mGridRotation = first_grid_object->getRenderRotation();
+ LLSelectNode *node = mSelectedObjects->findNode(first_grid_object);
+ if (node) {
+ mGridRotation = node->mSavedRotation;
+ }
+ else {
+ mGridRotation = first_grid_object->getRenderRotation();
+ }
LLVector4a min_extents(F32_MAX);
LLVector4a max_extents(-F32_MAX);