diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-05-17 00:00:44 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-05-17 00:00:44 +0300 |
commit | 07dc391ab76a8860d04bfb001cdc686cd576663d (patch) | |
tree | 6b44381a3af6190ee672c8a6c45683bc9376c0d1 /indra | |
parent | a8fc3fb32b9ccf3586a20ab3cb7b10522d808f1f (diff) |
SL-19720 Fix missing buttons for replacing body parts
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llwearableitemslist.cpp | 9 |
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); |