diff options
Diffstat (limited to 'indra/newview/llcofwearables.cpp')
-rw-r--r-- | indra/newview/llcofwearables.cpp | 17 |
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); |