Actually fix the outfit list correctly - looks like this isn't necessary anymore - at least the LL viewer doesn't allow removing body parts now apparently

master
Ansariel 2024-09-19 16:11:48 +02:00
parent 8f837e0c31
commit e9907f0cbb
2 changed files with 3 additions and 10 deletions

View File

@ -144,7 +144,6 @@ void LLPanelInventoryListItemBase::addWidgetToRightSide(const std::string& name,
void LLPanelInventoryListItemBase::addWidgetToRightSide(LLUICtrl* ctrl, bool show_widget/* = true*/)
{
if (ctrl == nullptr)return; // <FS:Beq/> avoid crash if ctrl is null
mRightSideWidgets.push_back(ctrl);
setShowWidget(ctrl, show_widget);
}

View File

@ -116,16 +116,10 @@ bool LLPanelWearableOutfitItem::postBuild()
LLPanelWearableListItem::postBuild();
//if(mShowWidgets) // <FS:Ansariel> Make Add/Remove buttons work
if(mShowWidgets)
{
// <FS:Ansariel> Make Add/Remove buttons work
//addWidgetToRightSide(mAddWearableBtn);
//addWidgetToRightSide(mAddWearableBtn);
LLViewerInventoryItem* inv_item = getItem();
mShowWidgets &= (inv_item->getType() != LLAssetType::AT_BODYPART);
addWidgetToRightSide(mAddWearableBtn, mShowWidgets);
addWidgetToRightSide(mAddWearableBtn, mShowWidgets);
// </FS:Ansariel>
addWidgetToRightSide(mAddWearableBtn);
addWidgetToRightSide(mRemoveWearableBtn);
mAddWearableBtn->setClickedCallback(boost::bind(&LLPanelWearableOutfitItem::onAddWearable, this));
mRemoveWearableBtn->setClickedCallback(boost::bind(&LLPanelWearableOutfitItem::onRemoveWearable, this));