From cbb83180e8ea6c1f64c77049ea62f2977f55e2f1 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 26 Jun 2013 11:27:13 -0400 Subject: SH-4305 WIP - one more case where we need to use slammer to update category --- indra/newview/llappearancemgr.cpp | 16 ++++------------ indra/newview/llappearancemgr.h | 5 +++-- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 8a0814734c..5f061ca290 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1450,7 +1450,7 @@ void LLAppearanceMgr::shallowCopyCategory(const LLUUID& src_id, const LLUUID& ds gInventory.notifyObservers(); } -void LLAppearanceMgr::copyCategoryLinks(const LLUUID& src_id, const LLUUID& dst_id, +void LLAppearanceMgr::slamCategoryLinks(const LLUUID& src_id, const LLUUID& dst_id, bool include_folder_links, LLPointer cb) { LLInventoryModel::cat_array_t* cats; @@ -2882,14 +2882,12 @@ bool LLAppearanceMgr::updateBaseOutfit() updateClothingOrderingInfo(); - // in a Base Outfit we do not remove items, only links - remove_folder_contents(base_outfit_id, false, NULL); - LLPointer dirty_state_updater = new LLBoostFuncInventoryCallback(no_op_inventory_func, appearance_mgr_update_dirty_state); //COF contains only links so we copy to the Base Outfit only links - shallowCopyCategoryContents(getCOF(), base_outfit_id, dirty_state_updater); + bool copy_folder_links = false; + slamCategoryLinks(getCOF(), base_outfit_id, copy_folder_links, dirty_state_updater); return true; } @@ -2937,12 +2935,6 @@ struct WearablesOrderComparator bool operator()(const LLInventoryItem* item1, const LLInventoryItem* item2) { - if (!item1 || !item2) - { - llwarning("either item1 or item2 is NULL", 0); - return true; - } - const std::string& desc1 = item1->getActualDescription(); const std::string& desc2 = item2->getActualDescription(); @@ -3437,7 +3429,7 @@ void LLAppearanceMgr::onOutfitFolderCreatedAndClothingOrdered(const LLUUID& fold new LLBoostFuncInventoryCallback(no_op_inventory_func, boost::bind(show_created_outfit,folder_id,show_panel)); bool copy_folder_links = false; - copyCategoryLinks(getCOF(), folder_id, copy_folder_links, cb); + slamCategoryLinks(getCOF(), folder_id, copy_folder_links, cb); } void LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, bool show_panel) diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 4d7c536b3d..ddef3b4a9b 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -74,8 +74,9 @@ public: S32 getActiveCopyOperations() const; - // Copy all links via the slam command (single inventory operation where supported) - void copyCategoryLinks(const LLUUID& src_id, const LLUUID& dst_id, + // Replace category contents with copied links via the slam_inventory_folder + // command (single inventory operation where supported) + void slamCategoryLinks(const LLUUID& src_id, const LLUUID& dst_id, bool include_folder_links, LLPointer cb); // Copy all items and the src category itself. -- cgit v1.2.3