diff options
author | Paul ProductEngine <pguslisty@productengine.com> | 2012-03-16 17:36:10 +0200 |
---|---|---|
committer | Paul ProductEngine <pguslisty@productengine.com> | 2012-03-16 17:36:10 +0200 |
commit | ac14d9b50b45abee1899c53e3e0d4145ef81ceea (patch) | |
tree | e53327840f68f4e0e1e43aba5adaa5a697594273 | |
parent | 3894701180e436f313afdb94ed9b5d95f15474ce (diff) |
MAINT-290 FIXED ([PUBLIC]Take object (which belongs to another avatar) does not work)
Reason: Showing the confirmation dialog resets object selection, thus there is nothing to derez.
Fix: pass selection to the confirm_take, so that selection doesn't "die" after confirmation dialog is opened
-rw-r--r-- | indra/newview/llviewermenu.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 99540ccce9..7a873974eb 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -200,7 +200,7 @@ BOOL enable_take(); void handle_take(); void handle_object_show_inspector(); void handle_avatar_show_inspector(); -bool confirm_take(const LLSD& notification, const LLSD& response); +bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection_handle); void handle_buy_object(LLSaleInfo sale_info); void handle_buy_contents(LLSaleInfo sale_info); @@ -4405,7 +4405,10 @@ void handle_take() LLNotification::Params params("ConfirmObjectTakeLock"); params.payload(payload); - params.functor.function(confirm_take); + // MAINT-290 + // Reason: Showing the confirmation dialog resets object selection, thus there is nothing to derez. + // Fix: pass selection to the confirm_take, so that selection doesn't "die" after confirmation dialog is opened + params.functor.function(boost::bind(confirm_take, _1, _2, LLSelectMgr::instance().getSelection())); if(locked_but_takeable_object || !you_own_everything) @@ -4458,7 +4461,7 @@ void handle_avatar_show_inspector() -bool confirm_take(const LLSD& notification, const LLSD& response) +bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection_handle) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if(enable_take() && (option == 0)) |