From 2ab9fbf019b579e0130b75769bd3c862040480a8 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 13 May 2010 13:25:02 +0300 Subject: EXT-7218 FIXED added a delete button for attachment items (panel outfit edit) added a deletable wearable item, predecessor of a clothing item, which is used for attachment items Reviewed by Neal Orman and Mike Antipov at https://codereview.productengine.com/secondlife/r/377 --HG-- branch : product-engine --- indra/newview/llcofwearables.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'indra/newview/llcofwearables.cpp') diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index c73aa5f415..498aeec682 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -150,7 +150,7 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel LLPanelInventoryListItemBase* item_panel = NULL; if (item_type == LLAssetType::AT_OBJECT) { - item_panel = LLPanelInventoryListItemBase::create(item); + item_panel = buildAttachemntListItem(item); mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); } else if (item_type == LLAssetType::AT_BODYPART) @@ -232,6 +232,21 @@ LLPanelBodyPartsListItem* LLCOFWearables::buildBodypartListItem(LLViewerInventor return item_panel; } +LLPanelDeletableWearableListItem* LLCOFWearables::buildAttachemntListItem(LLViewerInventoryItem* item) +{ + llassert(item); + if (!item) return NULL; + + LLPanelDeletableWearableListItem* item_panel = LLPanelDeletableWearableListItem::create(item); + if (!item_panel) return NULL; + + //setting callbacks + //*TODO move that item panel's inner structure disclosing stuff into the panels + item_panel->childSetAction("btn_delete", mCOFCallbacks.mDeleteWearable); + + return item_panel; +} + void LLCOFWearables::populateClothingList(LLAppearanceMgr::wearables_by_type_t& clothing_by_type) { llassert(clothing_by_type.size() == LLWearableType::WT_COUNT); -- cgit v1.2.3