diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-22 15:18:08 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-22 15:18:08 -0800 |
commit | 9e0920df2c8ada63397ea6e439b02ee5b40d1bf6 (patch) | |
tree | 26f6af13d1dcd9d02c48bd7897b3604481f3734c /indra/newview/llviewermenu.cpp | |
parent | b96e52b72ab598a57d981c850b5f14b1ac406325 (diff) | |
parent | 4cf79224d099c4fc8bdfd9617e95a776d5a028d4 (diff) |
Merge from v2 trunk.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 692474cb2d..79aae9463b 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6099,7 +6099,8 @@ class LLAttachmentEnableDrop : public view_listener_t LLViewerJointAttachment* attachment = NULL; LLInventoryItem* item = NULL; - if (object) + // Do not enable drop if all faces of object are not enabled + if (object && LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) { S32 attachmentID = ATTACHMENT_ID_FROM_STATE(object->getState()); attachment = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL); @@ -6141,8 +6142,14 @@ class LLAttachmentEnableDrop : public view_listener_t BOOL enable_detach(const LLSD&) { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - if (!object) return FALSE; - if (!object->isAttachment()) return FALSE; + + // Only enable detach if all faces of object are selected + if (!object || + !object->isAttachment() || + !LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) + { + return FALSE; + } // Find the avatar who owns this attachment LLViewerObject* avatar = object; |