SL-19720 Fix missing buttons for replacing body parts

master
Andrey Kleshchev 2023-05-17 00:00:44 +03:00
parent a8fc3fb32b
commit 07dc391ab7
1 changed files with 6 additions and 3 deletions

View File

@ -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);