summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-07-13 09:22:06 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-07-13 09:22:06 +0100
commitc8602b293517dfb4d5c6658ab235af9fe9932b7e (patch)
treeb5272175264fa52d235a78365205d817d363c320 /indra/newview/llappearancemgr.cpp
parentef685e520967f41549519b8df14c7d585f3b644b (diff)
parentf790036002a49176066ec346e4068dc05aa88357 (diff)
merge from PE's viewer-release
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index df048fef02..a7d90ab8d3 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2179,17 +2179,19 @@ void LLAppearanceMgr::updateIsDirty()
}
else
{
+ LLIsOfAssetType collector = LLIsOfAssetType(LLAssetType::AT_LINK);
+
LLInventoryModel::cat_array_t cof_cats;
LLInventoryModel::item_array_t cof_items;
- gInventory.collectDescendents(cof, cof_cats, cof_items,
- LLInventoryModel::EXCLUDE_TRASH);
+ gInventory.collectDescendentsIf(cof, cof_cats, cof_items,
+ LLInventoryModel::EXCLUDE_TRASH, collector);
LLInventoryModel::cat_array_t outfit_cats;
LLInventoryModel::item_array_t outfit_items;
- gInventory.collectDescendents(base_outfit, outfit_cats, outfit_items,
- LLInventoryModel::EXCLUDE_TRASH);
+ gInventory.collectDescendentsIf(base_outfit, outfit_cats, outfit_items,
+ LLInventoryModel::EXCLUDE_TRASH, collector);
- if(outfit_items.count() != cof_items.count() -1)
+ if(outfit_items.count() != cof_items.count())
{
// Current outfit folder should have one more item than the outfit folder.
// this one item is the link back to the outfit folder itself.
@@ -2197,16 +2199,6 @@ void LLAppearanceMgr::updateIsDirty()
return;
}
- //getting rid of base outfit folder link to simplify comparison
- for (LLInventoryModel::item_array_t::iterator it = cof_items.begin(); it != cof_items.end(); ++it)
- {
- if (*it == base_outfit_item)
- {
- cof_items.erase(it);
- break;
- }
- }
-
//"dirty" - also means a difference in linked UUIDs and/or a difference in wearables order (links' descriptions)
std::sort(cof_items.begin(), cof_items.end(), sort_by_linked_uuid);
std::sort(outfit_items.begin(), outfit_items.end(), sort_by_linked_uuid);