summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-03-30 15:42:43 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-03-30 15:42:43 -0700
commitc1a5d6a36b925728d98c37522ed7ae53e3a87155 (patch)
treef6bb8cff46ade72e57e0a03a5381234db0befc9c /indra/newview/llselectmgr.cpp
parentfcda925072c51de749e6b35b3863f29d8be3eaa6 (diff)
PATH-450: Disabling the movement and shape manipulation widgets when editing an item in a linked set.
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 44a0b3adc4..49c568039c 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -644,7 +644,9 @@ bool LLSelectMgr::enableLinkObjects()
{
virtual bool apply(LLViewerObject* object)
{
- return object->permModify() && !object->isPermanentEnforced();
+ LLViewerObject *root_object = (object == NULL) ? NULL : object->getRootEdit();
+ return object->permModify() && !object->isPermanentEnforced() &&
+ ((root_object == NULL) || !root_object->isPermanentEnforced());
}
} func;
const bool firstonly = true;
@@ -657,10 +659,12 @@ bool LLSelectMgr::enableLinkObjects()
bool LLSelectMgr::enableUnlinkObjects()
{
LLViewerObject* first_editable_object = LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject();
+ LLViewerObject *root_object = (first_editable_object == NULL) ? NULL : first_editable_object->getRootEdit();
bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() &&
first_editable_object &&
- !first_editable_object->isAttachment() && !first_editable_object->isPermanentEnforced();
+ !first_editable_object->isAttachment() && !first_editable_object->isPermanentEnforced() &&
+ ((root_object == NULL) || !root_object->isPermanentEnforced());
return new_value;
}