summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorChristian Goetze (CG) <cg@lindenlab.com>2010-07-22 13:29:05 -0700
committerChristian Goetze (CG) <cg@lindenlab.com>2010-07-22 13:29:05 -0700
commitfe8a5a007ab82f3d6a763c5cb133e1299d238632 (patch)
tree7a0787f0cb5a70890b878e999521ff4522fd75b4 /indra/newview/llappearancemgr.cpp
parent4339600d43601f07d01c676cce5da17c2758c4cb (diff)
parent9838884d908ad0c910251c64c7cb3c761ac11f70 (diff)
merged from "viewer-hotfix"
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index a7d90ab8d3..43f6be42b6 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -995,7 +995,7 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up
{
removeCOFItemLinks(gAgentWearables.getWearableItemID(item_to_wear->getWearableType(), wearable_count-1), false);
}
- addCOFItemLink(item_to_wear, do_update, cb);
+ addCOFItemLink(item_to_wear, do_update);
}
break;
case LLAssetType::AT_BODYPART:
@@ -2179,19 +2179,17 @@ void LLAppearanceMgr::updateIsDirty()
}
else
{
- LLIsOfAssetType collector = LLIsOfAssetType(LLAssetType::AT_LINK);
-
LLInventoryModel::cat_array_t cof_cats;
LLInventoryModel::item_array_t cof_items;
- gInventory.collectDescendentsIf(cof, cof_cats, cof_items,
- LLInventoryModel::EXCLUDE_TRASH, collector);
+ gInventory.collectDescendents(cof, cof_cats, cof_items,
+ LLInventoryModel::EXCLUDE_TRASH);
LLInventoryModel::cat_array_t outfit_cats;
LLInventoryModel::item_array_t outfit_items;
- gInventory.collectDescendentsIf(base_outfit, outfit_cats, outfit_items,
- LLInventoryModel::EXCLUDE_TRASH, collector);
+ gInventory.collectDescendents(base_outfit, outfit_cats, outfit_items,
+ LLInventoryModel::EXCLUDE_TRASH);
- if(outfit_items.count() != cof_items.count())
+ if(outfit_items.count() != cof_items.count() -1)
{
// Current outfit folder should have one more item than the outfit folder.
// this one item is the link back to the outfit folder itself.
@@ -2199,6 +2197,16 @@ 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);