diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-09-27 19:54:10 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-09-27 19:54:10 +0100 |
commit | a84ee929a5221aec07bcc93815ca6c57bb8ab6bb (patch) | |
tree | ecf9694b9e772161b67c8b0935362b0e05cc7c7d /indra/newview/llselectmgr.cpp | |
parent | 4d4255c27b45ed5e32fe7c4870e2ce3ed10cb140 (diff) | |
parent | 58aef8beaf79dc83546a7b080014ca5030733ac8 (diff) |
merge
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 983606a604..4a2d545b33 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3685,6 +3685,39 @@ void LLSelectMgr::selectForceDelete() SEND_ONLY_ROOTS); } +BOOL LLSelectMgr::selectGetEditMoveLinksetPermissions(bool &move, bool &modify) +{ + move = true; + modify = true; + bool selecting_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); + + for (LLObjectSelection::iterator iter = getSelection()->begin(); + iter != getSelection()->end(); iter++) + { + LLSelectNode* nodep = *iter; + LLViewerObject* object = nodep->getObject(); + if (!object || !nodep->mValid) + { + move = false; + modify = false; + return FALSE; + } + + LLViewerObject *root_object = object->getRootEdit(); + bool this_object_movable = false; + if (object->permMove() && !object->isPermanentEnforced() && + ((root_object == NULL) || !root_object->isPermanentEnforced()) && + (object->permModify() || selecting_linked_set)) + { + this_object_movable = true; + } + move = move && this_object_movable; + modify = modify && object->permModify(); + } + + return TRUE; +} + void LLSelectMgr::selectGetAggregateSaleInfo(U32 &num_for_sale, BOOL &is_for_sale_mixed, BOOL &is_sale_price_mixed, |