diff options
author | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-06-10 15:42:23 +0300 |
---|---|---|
committer | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-06-10 15:42:23 +0300 |
commit | 0480e29597a354279119c28839710b54bc030bc7 (patch) | |
tree | b23dcb923daed128af0b9d44bfd66ed3be708498 /indra/newview/llwearableitemslist.cpp | |
parent | 0a6e0deb3245775a284fad78aa4007be8d09074b (diff) |
EXT-7609 FIXED Added worn items indication in Appearance panel.
- Added (worn) suffix to indicate worn item of LLPanelInventoryListItemBase type (all flat list items in Appearance panel).
- Used LLOutfitObserver for updating (worn) suffix when user wears an item from My Outfits list.
- Added updating only items and links to items with specific UUIDs in LLWearableItemsList.
Reviewed by Vadim Savchuk https://codereview.productengine.com/secondlife/r/551/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llwearableitemslist.cpp')
-rw-r--r-- | indra/newview/llwearableitemslist.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 6c410cf7a5..888dedb340 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -38,7 +38,6 @@ #include "llagentwearables.h" #include "llappearancemgr.h" #include "llinventoryfunctions.h" -#include "llinventorymodel.h" #include "llmenugl.h" // for LLContextMenu #include "lltransutil.h" #include "llviewerattachmenu.h" @@ -510,6 +509,37 @@ void LLWearableItemsList::updateList(const LLUUID& category_id) refreshList(item_array); } +void LLWearableItemsList::updateChangedItems(const LLInventoryModel::changed_items_t& changed_items_uuids) +{ + typedef std::vector<LLPanel*> item_panel_list_t; + + item_panel_list_t items; + getItems(items); + + for (item_panel_list_t::iterator items_iter = items.begin(); + items_iter != items.end(); + ++items_iter) + { + LLPanelInventoryListItemBase* item = dynamic_cast<LLPanelInventoryListItemBase*>(*items_iter); + if (!item) continue; + + LLViewerInventoryItem* inv_item = item->getItem(); + if (!inv_item) continue; + + LLUUID linked_uuid = inv_item->getLinkedUUID(); + + for (LLInventoryModel::changed_items_t::iterator iter = changed_items_uuids.begin(); + iter != changed_items_uuids.end(); + ++iter) + { + if (linked_uuid == *iter) + { + item->setNeedsRefresh(true); + } + } + } +} + void LLWearableItemsList::onRightClick(S32 x, S32 y) { uuid_vec_t selected_uuids; |