summaryrefslogtreecommitdiff
path: root/indra/newview/llwearableitemslist.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2023-08-29 03:40:10 -0700
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2023-08-29 03:40:10 -0700
commitc5bfe869154cd4708c9bca63f08cb4c958198638 (patch)
tree6f79db9976863b2c1ea0f20bbb4049ee0cc98c1c /indra/newview/llwearableitemslist.cpp
parentfbecd348f897ee91a5639e7e9fe4f0578d72b8e2 (diff)
parent89f2165b4170d9fddc10a55292c28750093a22a0 (diff)
Merge branch 'DRTVWR-559' into DRTVWR-583
Diffstat (limited to 'indra/newview/llwearableitemslist.cpp')
-rw-r--r--indra/newview/llwearableitemslist.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 89b74ae962..8681f7c14e 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -104,8 +104,6 @@ BOOL LLPanelWearableOutfitItem::postBuild()
{
LLPanelWearableListItem::postBuild();
- LLViewerInventoryItem* inv_item = getItem();
- mShowWidgets &= (inv_item->getType() != LLAssetType::AT_BODYPART);
if(mShowWidgets)
{
addWidgetToRightSide("add_wearable");
@@ -208,7 +206,12 @@ void LLPanelWearableOutfitItem::updateItem(const std::string& name,
if(mShowWidgets)
{
setShowWidget("add_wearable", !is_worn);
- setShowWidget("remove_wearable", 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);
+
if(mHovered)
{
setWidgetsVisible(true);