summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-07-21 15:28:28 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-07-21 15:28:28 -0400
commitc3973a4895a5827a5a95dd15e99813bc32e11993 (patch)
tree4c06aa501b4500b2ef883664d1c6176ced05ee6b
parent842e5111ae2d0a83755ff902afa43dc84e45662b (diff)
EXT-8135 FIX - use LLUpdateAppearanceOnDestroy callback to postpone appearance update until all links are created
-rw-r--r--indra/newview/llappearancemgr.cpp12
-rw-r--r--indra/newview/llappearancemgr.h2
-rw-r--r--indra/newview/llwearableitemslist.cpp6
3 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index d2449abf08..d6ac6e1e5e 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2726,3 +2726,15 @@ BOOL LLAppearanceMgr::getIsProtectedCOFItem(const LLUUID& obj_id) const
return FALSE;
*/
}
+
+void wear_multiple(const uuid_vec_t& ids, bool replace)
+{
+ LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy;
+
+ uuid_vec_t::const_iterator it;
+ for (it = ids.begin(); it != ids.end(); ++it)
+ {
+ LLAppearanceMgr::instance().wearItemOnAvatar(*it,false,replace,cb);
+ }
+}
+
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 84c911c038..a6cd129306 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -418,4 +418,6 @@ void callAfterCategoryFetch(const LLUUID& cat_id, T callable)
}
}
+void wear_multiple(const uuid_vec_t& ids, bool replace);
+
#endif
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 35abbc0c4d..79a13d042d 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -676,13 +676,11 @@ LLContextMenu* LLWearableItemsList::ContextMenu::createMenu()
const uuid_vec_t& ids = mUUIDs; // selected items IDs
LLUUID selected_id = ids.front(); // ID of the first selected item
- functor_t wear = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, true, LLPointer<LLInventoryCallback>(NULL));
- functor_t add = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, false, LLPointer<LLInventoryCallback>(NULL));
functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1);
// Register handlers common for all wearable types.
- registrar.add("Wearable.Wear", boost::bind(handleMultiple, wear, ids));
- registrar.add("Wearable.Add", boost::bind(handleMultiple, add, ids));
+ registrar.add("Wearable.Wear", boost::bind(wear_multiple, ids, false));
+ registrar.add("Wearable.Add", boost::bind(wear_multiple, ids, true));
registrar.add("Wearable.Edit", boost::bind(handleMultiple, LLAgentWearables::editWearable, ids));
registrar.add("Wearable.CreateNew", boost::bind(createNewWearable, selected_id));
registrar.add("Wearable.ShowOriginal", boost::bind(show_item_original, selected_id));