diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-02-25 16:50:21 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-02-25 16:50:21 -0800 |
commit | 5ed6e0720af1b6cdf1a983e2c040eeb5d8ae33ba (patch) | |
tree | 5d0141f43cfaf59e5cb62eb2f4ca9541160e6173 /indra/newview/llviewermenu.cpp | |
parent | 3ab4b0f58326a01a09aa99f262c03d2703215af2 (diff) | |
parent | 6e932911d5b0a02b44caf3bf81a9c00fd0e1dc89 (diff) |
warn-on-failure:unix-eol
automated merge from 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 6262bca432..455b572537 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; |