summaryrefslogtreecommitdiff
path: root/indra/newview/llmaniprotate.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-09-07 14:47:24 -0400
committerNat Goodspeed <nat@lindenlab.com>2012-09-07 14:47:24 -0400
commit695c4135ff6fa0c50daa4c84f23096096ffd8a54 (patch)
treea9b539e3ba588634fc493f2ed5ead21124e306ff /indra/newview/llmaniprotate.cpp
parentaf6e665d5c9c9a5ea480389c284839f3945bf786 (diff)
parentb6f0921099b9b2a0a582886ebd6383fa20eac2b0 (diff)
Automated merge with file:///Users/nat/linden/davep-viewer-development-rebased
Diffstat (limited to 'indra/newview/llmaniprotate.cpp')
-rw-r--r--indra/newview/llmaniprotate.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index a8da94f75e..826e8d560a 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -479,9 +479,12 @@ BOOL LLManipRotate::handleMouseUp(S32 x, S32 y, MASK mask)
{
LLSelectNode* selectNode = *iter;
LLViewerObject* object = selectNode->getObject();
+ LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();
// have permission to move and object is root of selection or individually selected
- if (object->permMove() && (object->isRootEdit() || selectNode->mIndividualSelection))
+ if (object->permMove() && !object->isPermanentEnforced() &&
+ ((root_object == NULL) || !root_object->isPermanentEnforced()) &&
+ (object->isRootEdit() || selectNode->mIndividualSelection))
{
object->mUnselectedChildrenPositions.clear() ;
}
@@ -567,9 +570,12 @@ void LLManipRotate::drag( S32 x, S32 y )
{
LLSelectNode* selectNode = *iter;
LLViewerObject* object = selectNode->getObject();
+ LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();
// have permission to move and object is root of selection or individually selected
- if (object->permMove() && (object->isRootEdit() || selectNode->mIndividualSelection))
+ if (object->permMove() && !object->isPermanentEnforced() &&
+ ((root_object == NULL) || !root_object->isPermanentEnforced()) &&
+ (object->isRootEdit() || selectNode->mIndividualSelection))
{
if (!object->isRootEdit())
{
@@ -621,9 +627,11 @@ void LLManipRotate::drag( S32 x, S32 y )
{
LLSelectNode* selectNode = *iter;
LLViewerObject* object = selectNode->getObject();
+ LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();
// to avoid cumulative position changes we calculate the objects new position using its saved position
- if (object && object->permMove())
+ if (object && object->permMove() && !object->isPermanentEnforced() &&
+ ((root_object == NULL) || !root_object->isPermanentEnforced()))
{
LLVector3 center = gAgent.getPosAgentFromGlobal( mRotationCenter );
@@ -704,7 +712,10 @@ void LLManipRotate::drag( S32 x, S32 y )
{
LLSelectNode* selectNode = *iter;
LLViewerObject*cur = selectNode->getObject();
- if( cur->permModify() && cur->permMove() && !cur->isAvatar())
+ LLViewerObject *root_object = (cur == NULL) ? NULL : cur->getRootEdit();
+ if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() &&
+ ((root_object == NULL) || !root_object->isPermanentEnforced()) &&
+ !cur->isAvatar())
{
selectNode->mLastRotation = cur->getRotation();
selectNode->mLastPositionLocal = cur->getPosition();
@@ -1871,7 +1882,10 @@ BOOL LLManipRotate::canAffectSelection()
{
virtual bool apply(LLViewerObject* objectp)
{
- return objectp->permMove() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
+ LLViewerObject *root_object = (objectp == NULL) ? NULL : objectp->getRootEdit();
+ return objectp->permMove() && !objectp->isPermanentEnforced() &&
+ ((root_object == NULL) || !root_object->isPermanentEnforced()) &&
+ (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
}
} func;
can_rotate = mObjectSelection->applyToObjects(&func);