summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-04-18 13:56:16 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-04-18 13:56:16 -0400
commit17af76fae18e305d0a42192a326648f00c84d1f3 (patch)
tree5afa2ec42e6a8eb56f727c04284c70f24f578d58 /indra/newview/llappearancemgr.cpp
parentb224b8978adfd42c89e1c66bc5495ead8fa1e85d (diff)
SH-4128 WIP - use the AISv3 inventory cap when available for cof link deletion, hook in to callback mechanism so all link operations should be done before outfit is worn.
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rwxr-xr-xindra/newview/llappearancemgr.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 85f6f92278..f1a2141b99 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1661,7 +1661,7 @@ void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category)
}
}
-void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_links, LLInventoryModel::item_array_t* keep_items)
+void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_links, LLPointer<LLInventoryCallback> cb)
{
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
@@ -1674,19 +1674,8 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin
continue;
if (item->getIsLinkType())
{
-#if 0
- if (keep_items && keep_items->find(item) != LLInventoryModel::item_array_t::FAIL)
- {
- llinfos << "preserved item" << llendl;
- }
- else
- {
- gInventory.purgeObject(item->getUUID());
- }
-#else
- gInventory.purgeObject(item->getUUID());
+ remove_inventory_item(item->getUUID(), cb);
}
-#endif
}
}
@@ -1819,7 +1808,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
// carried over (e.g. keeping old shape if the new outfit does not
// contain one)
bool keep_outfit_links = append;
- purgeCategory(cof, keep_outfit_links, &all_items);
+ purgeCategory(cof, keep_outfit_links, link_waiter);
gInventory.notifyObservers();
LL_DEBUGS("Avatar") << self_av_string() << "waiting for LLUpdateAppearanceOnDestroy" << LL_ENDL;
@@ -2824,7 +2813,7 @@ bool LLAppearanceMgr::updateBaseOutfit()
updateClothingOrderingInfo();
// in a Base Outfit we do not remove items, only links
- purgeCategory(base_outfit_id, false);
+ purgeCategory(base_outfit_id, false, NULL);
LLPointer<LLInventoryCallback> dirty_state_updater =
new LLBoostFuncInventoryCallback(no_op_inventory_func, appearance_mgr_update_dirty_state);
@@ -3211,7 +3200,6 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond
}
LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << llendl;
- //LLCurl::ResponderPtr responder_ptr;
if (!responder_ptr.get())
{
responder_ptr = new RequestAgentUpdateAppearanceResponder;