summaryrefslogtreecommitdiff
path: root/indra/newview/llwearableitemslist.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-08-09 17:57:23 -0700
committerBrad Linden <brad@lindenlab.com>2024-08-09 17:57:23 -0700
commita7fde9d79c517bfc6165756c1bc3eb16fa4d935c (patch)
treef0608f7f72f23a447778f8bce6f210eb221ebdf1 /indra/newview/llwearableitemslist.cpp
parentac330f63fd7ac655bbd06ce5d4ed65430aa2f42a (diff)
parentc106221726c48a4231b7854bff224ae422c0517f (diff)
Merge remote-tracking branch release/2024.06-atlasaurus into 'develop'
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)
{