diff options
| author | Leyla Farazha <leyla@lindenlab.com> | 2010-01-05 15:57:09 -0800 |
|---|---|---|
| committer | Leyla Farazha <leyla@lindenlab.com> | 2010-01-05 15:57:09 -0800 |
| commit | ab3dbd647e78cff67ce7ffe85bb6fbc5c5461312 (patch) | |
| tree | c173a561457b6fb0195194cb21fa0d24c15e9589 /indra/newview/llviewermenu.cpp | |
| parent | db6069e249b509e1551a76f438d795cbb9f992fa (diff) | |
| parent | cffe23df08bb0066c936efe667f60e90e0f89fd0 (diff) | |
Merge
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index bd589b5485..149b7a6d65 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5859,8 +5859,12 @@ void confirm_replace_attachment(S32 option, void* user_data) } } -bool callback_attachment_drop(const LLSD& notification, const LLSD& response) +void callback_attachment_drop(const LLSD& notification, const LLSD& response) { + // Ensure user confirmed the drop + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) return; + // Called when the user clicked on an object attached to them // and selected "Drop". LLUUID object_id = notification["payload"]["object_id"].asUUID(); @@ -5869,7 +5873,7 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response) if (!object) { llwarns << "handle_drop_attachment() - no object to drop" << llendl; - return true; + return; } LLViewerObject *parent = (LLViewerObject*)object->getParent(); @@ -5886,13 +5890,13 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response) if (!object) { llwarns << "handle_detach() - no object to detach" << llendl; - return true; + return; } if (object->isAvatar()) { llwarns << "Trying to detach avatar from avatar." << llendl; - return true; + return; } // reselect the object @@ -5900,7 +5904,7 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response) LLSelectMgr::getInstance()->sendDropAttachment(); - return true; + return; } class LLAttachmentDrop : public view_listener_t |
