From b232919c0a6d66582b57c8997fee7a99ab9bbddb Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 21 Aug 2012 17:03:42 -0400 Subject: SH-3625 WIP - consolidating code paths for wearable/attachment removal --- indra/newview/llpanelwearing.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) mode change 100644 => 100755 indra/newview/llpanelwearing.cpp (limited to 'indra/newview/llpanelwearing.cpp') diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp old mode 100644 new mode 100755 index 3b9934d4be..aa3ed22bee --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -77,11 +77,7 @@ private: { uuid_vec_t selected_uuids; mPanelWearing->getSelectedItemsUUIDs(selected_uuids); - - for (uuid_vec_t::const_iterator it=selected_uuids.begin(); it != selected_uuids.end(); ++it) - { - LLAppearanceMgr::instance().removeItemFromAvatar(*it); - } + LLAppearanceMgr::instance().removeItemsFromAvatar(selected_uuids); } LLToggleableMenu* mMenu; @@ -97,12 +93,11 @@ protected: { LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1); - registrar.add("Wearing.Edit", boost::bind(&edit_outfit)); - registrar.add("Wearing.TakeOff", boost::bind(handleMultiple, take_off, mUUIDs)); - registrar.add("Wearing.Detach", boost::bind(handleMultiple, take_off, mUUIDs)); - + registrar.add("Wearing.TakeOff", + boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), mUUIDs)); + registrar.add("Wearing.Detach", + boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), mUUIDs)); LLContextMenu* menu = createFromFile("menu_wearing_tab.xml"); updateMenuItemsVisibility(menu); -- cgit v1.2.3