diff options
author | Christian Goetze (CG) <cg@lindenlab.com> | 2010-08-02 22:05:56 -0700 |
---|---|---|
committer | Christian Goetze (CG) <cg@lindenlab.com> | 2010-08-02 22:05:56 -0700 |
commit | d10b9a7f37bec670342136eeea2c8c2604fdfeef (patch) | |
tree | a6380a0442d103faed76f1a1c7e5eb03d0f3f6ae /indra/newview/llappearancemgr.cpp | |
parent | a39b31abf87d93fb41212e952cc3ad1d8c91b5ef (diff) | |
parent | b3b8ef25e192f5713c9d5ca47289499b17ff07d1 (diff) |
Pulled from "dessie/viewer-release"
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index e1635461db..78edcb3e25 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -999,7 +999,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); + addCOFItemLink(item_to_wear, do_update, cb); } break; case LLAssetType::AT_BODYPART: @@ -2183,17 +2183,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. @@ -2201,16 +2203,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); |