From 887b2858d4d180d3679f1eb39fd37be5a551615e Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Fri, 11 Jun 2010 20:02:42 +0300 Subject: EXT-7779 FIXED Changed wearing panel from inventory panel to a flat list similar to My Outfits view. - Added common interface for My Outfits and Wearing tabs. - Changed LLPanelOutfitsInventory to use common interface for My Outfits and Wearing tabs. - Removed dependency on outfits side panel from inventory bridge context menus. - Removed unused LLShowCreatedOutfit class from llagentwearables.cpp. - Restored opening newly created outfit in My Outfits tab. - Fixed worn items indication for Wearing tab items. Revieved by Neal Orman at https://codereview.productengine.com/secondlife/r/604/. --HG-- branch : product-engine --- indra/newview/llwearableitemslist.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'indra/newview/llwearableitemslist.cpp') diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 6aa6ebaa54..da15b93697 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -95,19 +95,22 @@ LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item) ////////////////////////////////////////////////////////////////////////// // static -LLPanelWearableOutfitItem* LLPanelWearableOutfitItem::create(LLViewerInventoryItem* item) +LLPanelWearableOutfitItem* LLPanelWearableOutfitItem::create(LLViewerInventoryItem* item, + bool worn_indication_enabled) { LLPanelWearableOutfitItem* list_item = NULL; if (item) { - list_item = new LLPanelWearableOutfitItem(item); + list_item = new LLPanelWearableOutfitItem(item, worn_indication_enabled); list_item->init(); } return list_item; } -LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item) +LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item, + bool worn_indication_enabled) : LLPanelInventoryListItemBase(item) +, mWornIndicationEnabled(worn_indication_enabled) { } @@ -117,7 +120,7 @@ void LLPanelWearableOutfitItem::updateItem(const std::string& name, { std::string search_label = name; - if (get_is_item_worn(mInventoryItemUUID)) + if (mWornIndicationEnabled && get_is_item_worn(mInventoryItemUUID)) { search_label += LLTrans::getString("worn"); item_state = IS_WORN; @@ -444,6 +447,7 @@ static const LLDefaultChildRegistry::Register r("wearable_i LLWearableItemsList::Params::Params() : standalone("standalone", true) +, worn_indication_enabled("worn_indication_enabled", true) {} LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) @@ -456,6 +460,7 @@ LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) // Use built-in context menu. setRightMouseDownCallback(boost::bind(&LLWearableItemsList::onRightClick, this, _2, _3)); } + mWornIndicationEnabled = p.worn_indication_enabled; } // virtual @@ -471,7 +476,7 @@ void LLWearableItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrange llassert(item != NULL); } - LLPanelWearableOutfitItem *list_item = LLPanelWearableOutfitItem::create(item); + LLPanelWearableOutfitItem *list_item = LLPanelWearableOutfitItem::create(item, mWornIndicationEnabled); if (!list_item) return; -- cgit v1.2.3