diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-01-21 15:10:45 -0800 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-01-21 15:10:45 -0800 |
commit | 8b8b86480821c209a057fd4433d1d810d186a4c1 (patch) | |
tree | 6fca2e2631494919e9bf577ccd8d18d235d44b66 /indra/newview | |
parent | 2981e9aa4cdbe083011d1f552bf0fe5178a499ce (diff) |
EXT-4266 Can't "drop" object selected in select-face mode
reviewed by Callum
Diffstat (limited to 'indra/newview')
-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 d2ba898cf0..5179bcaef7 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6065,7 +6065,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); @@ -6107,8 +6108,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; |