summaryrefslogtreecommitdiff
path: root/indra/newview/llcofwearables.cpp
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-05-13 13:25:02 +0300
committerIgor Borovkov <iborovkov@productengine.com>2010-05-13 13:25:02 +0300
commit2ab9fbf019b579e0130b75769bd3c862040480a8 (patch)
treeb54618df93c674652583c8bcef9de4db65737821 /indra/newview/llcofwearables.cpp
parent1b41e68636a43e2efc88faae29496895e882e0d0 (diff)
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
Diffstat (limited to 'indra/newview/llcofwearables.cpp')
-rw-r--r--indra/newview/llcofwearables.cpp17
1 files changed, 16 insertions, 1 deletions
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);