diff options
author | James Cook <james@lindenlab.com> | 2010-01-05 13:00:15 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-01-05 13:00:15 -0800 |
commit | b5f02c573799687b59e04fbd23cd730f5673f77b (patch) | |
tree | e36de62c4935537a5df5284916325af56440adad /indra | |
parent | 666faa3043885463caae5334f8a0cf0fa9b5539f (diff) |
EXT-3806 Attachment drop confirmation popup: "No" is ignored
Missing an if (option != 0)
Made callback function return void as result is not used.
Diffstat (limited to 'indra')
-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 40c74ccf82..fb64a1929d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5856,8 +5856,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(); @@ -5866,7 +5870,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(); @@ -5883,13 +5887,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 @@ -5897,7 +5901,7 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response) LLSelectMgr::getInstance()->sendDropAttachment(); - return true; + return; } class LLAttachmentDrop : public view_listener_t |