summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRuslan Teliuk <ruslantproductengine@lindenlab.com>2015-09-10 19:24:21 +0300
committerRuslan Teliuk <ruslantproductengine@lindenlab.com>2015-09-10 19:24:21 +0300
commitbcd10a94da57c7c399a72eb6dbdf172603f6467b (patch)
tree68f526c673083ce4ab72efb620c94484629f536e /indra/newview
parent744c1453ed595681cb30badfdd2cfc0bb4c6ccb3 (diff)
parent9bfd0f75c3e18a4743e4b5f7e0d5d15d99aca656 (diff)
Merged in ruslantproductengine/viewer-lion-ruslan-teliuk-4-code-review (pull request #1)
MAINT-5268 (Rotating an object that's used as grid reference goes crazy)
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llmaniprotate.cpp2
-rwxr-xr-xindra/newview/llselectmgr.cpp10
2 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index f172aa0955..e917b0ae52 100755
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -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..577c336ac7 100755
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -1235,7 +1235,15 @@ 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);