summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-06-26 11:27:13 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-06-26 11:27:13 -0400
commitcbb83180e8ea6c1f64c77049ea62f2977f55e2f1 (patch)
tree127d2a111a1bdb177c58e9cd3d81fa00f8bb6e01
parente2e198d9b36f4ef90ef7ca088e643b1fc399c53e (diff)
SH-4305 WIP - one more case where we need to use slammer to update category
-rwxr-xr-xindra/newview/llappearancemgr.cpp16
-rwxr-xr-xindra/newview/llappearancemgr.h5
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<LLInventoryCallback> 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<LLInventoryCallback> 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<LLInventoryCallback> cb);
// Copy all items and the src category itself.