summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneloutfitedit.cpp
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-07-08 14:13:26 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-07-08 14:13:26 -0700
commitbfb66a8b9422d9a86c728e8865b6fb7f936f1521 (patch)
tree74db0a3e99673a8f940abb1eaa5b706139fac546 /indra/newview/llpaneloutfitedit.cpp
parent19bb6f489aeac44b622c190ccaf9310af3b53208 (diff)
Fix for EXT-8151
Made LLPanelOutfitEdit::onPlusBtnClicked() iterate over all selected items and wear each one. Also made it create one LLUpdateAppearanceOnDestroy and pass it to all calls to wearItemOnAvatar. Add optional callback argument (as LLPointer) to wearItemOnAvatar, addCOFItemLink, LLDeferredCOFLinkObserver Reviewed by Nyx at http://codereview.lindenlab.com/2482033
Diffstat (limited to 'indra/newview/llpaneloutfitedit.cpp')
-rw-r--r--indra/newview/llpaneloutfitedit.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 2df1982e03..f8350a56ef 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -567,13 +567,20 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string)
void LLPanelOutfitEdit::onPlusBtnClicked(void)
{
- LLUUID selected_id;
- getCurrentItemUUID(selected_id);
-
- if (selected_id.isNull()) return;
+ uuid_vec_t selected_items;
+ getSelectedItemsUUID(selected_items);
- //replacing instead of adding the item
- LLAppearanceMgr::getInstance()->wearItemOnAvatar(selected_id, true, true);
+ LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
+
+ for(uuid_vec_t::iterator iter = selected_items.begin(); iter != selected_items.end(); iter++)
+ {
+ LLUUID selected_id = *iter;
+ if (!selected_id.isNull())
+ {
+ //replacing instead of adding the item
+ LLAppearanceMgr::getInstance()->wearItemOnAvatar(selected_id, false, true, link_waiter);
+ }
+ }
}
void LLPanelOutfitEdit::onVisibilityChange()