summaryrefslogtreecommitdiff
path: root/indra/newview/llwearableitemslist.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-08-23 22:28:01 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-08-23 22:28:01 +0300
commitd08859f3f4ba8ed68d018fba033b652926d1bf6b (patch)
treefd62430b9a2987ca2eab8a8f08114f113de84120 /indra/newview/llwearableitemslist.cpp
parentf40b85c4f495b9079991c41a26b76d397a6168ae (diff)
parentd454512050e636a19e4b7545515dea4f4b1bbf0d (diff)
Merge branch 'main' into DRTVWR-587-maint-V
# Conflicts: # autobuild.xml
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);