summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-07-16 17:35:29 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-07-16 17:35:29 +0300
commit1e883c5b3936abd8791a7a0350bd2ddac1f72161 (patch)
tree055a2d6140bf98bede84eb44b897be806f45d745 /indra/newview/llselectmgr.cpp
parentdc0bd05717106522eb350b02dbac663eaebb8eef (diff)
MAINT-8844 Fixed selection inconsistancies (inworld manipulation vs tool floater)
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index ddae109030..f3cac0abdf 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -3676,6 +3676,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;
+ if (!nodep->mValid)
+ {
+ move = false;
+ modify = false;
+ return FALSE;
+ }
+
+ LLViewerObject* object = nodep->getObject();
+ LLViewerObject *root_object = (object == NULL) ? NULL : 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,