summaryrefslogtreecommitdiff
path: root/indra/newview/llwearableitemslist.cpp
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2010-08-16 23:23:48 +0300
committerSergei Litovchuk <slitovchuk@productengine.com>2010-08-16 23:23:48 +0300
commitef46496775bca913f00747558e780aa0449d92bc (patch)
treeb856b194b8447d7611dc77fe6e220e7dd7954535 /indra/newview/llwearableitemslist.cpp
parent6c8494295ad05b127338681f8341dd5c9f53f9ea (diff)
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
Diffstat (limited to 'indra/newview/llwearableitemslist.cpp')
-rw-r--r--indra/newview/llwearableitemslist.cpp10
1 files changed, 7 insertions, 3 deletions
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)
{