summaryrefslogtreecommitdiff
path: root/indra/newview/llwearableitemslist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llwearableitemslist.cpp')
-rw-r--r--indra/newview/llwearableitemslist.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 5ee6aec9f9..8ce1a745c3 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -102,15 +102,21 @@ LLPanelWearableOutfitItem::Params::Params()
bool LLPanelWearableOutfitItem::postBuild()
{
+ if (mShowWidgets)
+ {
+ mAddWearableBtn = getChild<LLButton>("add_wearable");
+ mRemoveWearableBtn = getChild<LLButton>("remove_wearable");
+ }
+
LLPanelWearableListItem::postBuild();
if(mShowWidgets)
{
- addWidgetToRightSide("add_wearable");
- addWidgetToRightSide("remove_wearable");
+ addWidgetToRightSide(mAddWearableBtn);
+ addWidgetToRightSide(mRemoveWearableBtn);
- childSetAction("add_wearable", boost::bind(&LLPanelWearableOutfitItem::onAddWearable, this));
- childSetAction("remove_wearable", boost::bind(&LLPanelWearableOutfitItem::onRemoveWearable, this));
+ mAddWearableBtn->setClickedCallback(boost::bind(&LLPanelWearableOutfitItem::onAddWearable, this));
+ mRemoveWearableBtn->setClickedCallback(boost::bind(&LLPanelWearableOutfitItem::onRemoveWearable, this));
setWidgetsVisible(false);
reshapeWidgets();
@@ -205,12 +211,12 @@ void LLPanelWearableOutfitItem::updateItem(const std::string& name,
}
if(mShowWidgets)
{
- setShowWidget("add_wearable", !is_worn);
+ setShowWidget(mAddWearableBtn, !is_worn);
// Body parts can't be removed, only replaced
LLViewerInventoryItem* inv_item = getItem();
bool show_remove = is_worn && inv_item && (inv_item->getType() != LLAssetType::AT_BODYPART);
- setShowWidget("remove_wearable", show_remove);
+ setShowWidget(mRemoveWearableBtn, show_remove);
if(mHovered)
{