summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelobject.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <andreylproductengine@lindenlab.com>2018-06-22 12:55:19 +0300
committerAndrey Lihatskiy <andreylproductengine@lindenlab.com>2018-06-22 12:55:19 +0300
commit5f432147e373c3223ac06797ecff147d447ed79f (patch)
tree942f163ad33ad3997aee3000cae321f5f693ad57 /indra/newview/llpanelobject.cpp
parent99d9befb629c97f7c778c8a9ddfb9d0060d54de9 (diff)
parentdc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff)
Merged lindenlab/viewer-release into default
Diffstat (limited to 'indra/newview/llpanelobject.cpp')
-rw-r--r--indra/newview/llpanelobject.cpp33
1 files changed, 10 insertions, 23 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 0bf4d48421..25cfb598e7 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 ))
@@ -448,20 +448,6 @@ void LLPanelObject::getState( )
S32 roots_selected = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
BOOL editable = root_objectp->permModify();
- // Select Single Message
- getChildView("select_single")->setVisible( FALSE);
- getChildView("edit_object")->setVisible( FALSE);
- if (!editable || single_volume || selected_count <= 1)
- {
- getChildView("edit_object")->setVisible( TRUE);
- getChildView("edit_object")->setEnabled(TRUE);
- }
- else
- {
- getChildView("select_single")->setVisible( TRUE);
- getChildView("select_single")->setEnabled(TRUE);
- }
-
BOOL is_flexible = volobjp && volobjp->isFlexible();
BOOL is_permanent = root_objectp->flagObjectPermanent();
BOOL is_permanent_enforced = root_objectp->isPermanentEnforced();
@@ -1587,9 +1573,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 +1590,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) ;
}
@@ -1888,10 +1879,6 @@ void LLPanelObject::clearCtrls()
mLabelTaper ->setEnabled( FALSE );
mLabelRadiusOffset->setEnabled( FALSE );
mLabelRevolutions->setEnabled( FALSE );
-
- getChildView("select_single")->setVisible( FALSE);
- getChildView("edit_object")->setVisible( TRUE);
- getChildView("edit_object")->setEnabled(FALSE);
getChildView("scale_hole")->setEnabled(FALSE);
getChildView("scale_taper")->setEnabled(FALSE);