From 6be8313c9777a48ccf60ff8006c0223bed79de69 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Mon, 16 Aug 2010 23:23:48 +0300 Subject: EXT-8636 FIXED updating wearables (worn) prefix in 'My Outfits' list. - Fixed LLOutfitsList COF changes handler to update worn status of items removed from COF. Now they are updated based on the differences in original items' ids in COF. - Fixed 'My Outfits' items worn status check to update depending on whether the item is linked in COF or not. This is a kind of workaround to fix updating attachments' worn status because LLAppearanceMgr::updateAppearanceFromCOF is triggered erlier than new attachment links are fetched. When dumpItemArray(obj_items,"asset_dump: obj_item") is called from LLAppearanceMgr::updateAppearanceFromCOF, all attachment links have empty asset ids. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/859/. --HG-- branch : product-engine --- indra/newview/llwearableitemslist.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llwearableitemslist.cpp') diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 5e23965f62..bff4b9bcbd 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -124,7 +124,11 @@ void LLPanelWearableOutfitItem::updateItem(const std::string& name, { std::string search_label = name; - if (mWornIndicationEnabled && get_is_item_worn(mInventoryItemUUID)) + // Updating item's worn status depending on whether it is linked in COF or not. + // We don't use get_is_item_worn() here because this update is triggered by + // an inventory observer upon link in COF beind added or removed so actual + // worn status of a linked item may still remain unchanged. + if (mWornIndicationEnabled && LLAppearanceMgr::instance().isLinkInCOF(mInventoryItemUUID)) { search_label += LLTrans::getString("worn"); item_state = IS_WORN; @@ -659,7 +663,7 @@ void LLWearableItemsList::updateList(const LLUUID& category_id) refreshList(item_array); } -void LLWearableItemsList::updateChangedItems(const LLInventoryModel::changed_items_t& changed_items_uuids) +void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uuids) { // nothing to update if (changed_items_uuids.empty()) return; @@ -681,7 +685,7 @@ void LLWearableItemsList::updateChangedItems(const LLInventoryModel::changed_ite LLUUID linked_uuid = inv_item->getLinkedUUID(); - for (LLInventoryModel::changed_items_t::const_iterator iter = changed_items_uuids.begin(); + for (uuid_vec_t::const_iterator iter = changed_items_uuids.begin(); iter != changed_items_uuids.end(); ++iter) { -- cgit v1.2.3