diff options
author | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-05-18 19:25:54 +0100 |
---|---|---|
committer | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-05-18 19:25:54 +0100 |
commit | c0413250b7e6820b03288bf3bcb035b892870532 (patch) | |
tree | 2caad0268e3182e198e7c1fc1564c897ba8c130c /indra/newview/llpanelobject.cpp | |
parent | 56541379559c61406a4ab322b83be582ecae7806 (diff) | |
parent | 64b3473f4920b0340e731e44342e2599ad46d698 (diff) |
Merge 5.1.5
Diffstat (limited to 'indra/newview/llpanelobject.cpp')
-rw-r--r-- | indra/newview/llpanelobject.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 0bf4d48421..d0dea5d044 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -342,9 +342,9 @@ void LLPanelObject::getState( ) } // can move or rotate only linked group with move permissions, or sub-object with move and modify perms - BOOL enable_move = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); + BOOL enable_move = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); BOOL enable_scale = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && objectp->permModify(); - BOOL enable_rotate = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts")); + BOOL enable_rotate = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )) @@ -1587,9 +1587,14 @@ void LLPanelObject::sendRotation(BOOL btn_down) { rotation = rotation * ~mRootObject->getRotationRegion(); } + + // To include avatars into movements and rotation + // If false, all children are selected anyway - move avatar + // If true, not all children are selected - save positions + bool individual_selection = gSavedSettings.getBOOL("EditLinkedParts"); std::vector<LLVector3>& child_positions = mObject->mUnselectedChildrenPositions ; std::vector<LLQuaternion> child_rotations; - if (mObject->isRootEdit()) + if (mObject->isRootEdit() && individual_selection) { mObject->saveUnselectedChildrenRotation(child_rotations) ; mObject->saveUnselectedChildrenPosition(child_positions) ; @@ -1599,8 +1604,8 @@ void LLPanelObject::sendRotation(BOOL btn_down) LLManip::rebuild(mObject) ; // for individually selected roots, we need to counterrotate all the children - if (mObject->isRootEdit()) - { + if (mObject->isRootEdit() && individual_selection) + { mObject->resetChildrenRotationAndPosition(child_rotations, child_positions) ; } |