From 718ef09adf144a557faf9b6ca0930d91a41b2dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Apr 2020 09:21:21 -0400 Subject: [PATCH] Fix removing/exporting picks when unable to add more Wooops, wrote that wrong, must've been tired or something --- indra/newview/llpanelavatar.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 262913a84..7e235fd47 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -985,7 +985,8 @@ void LLPanelAvatarPicks::processProperties(void* data, EAvatarProcessorType type // are no tabs in the container. tabs->selectFirstTab(); bool edit(getPanelAvatar()->isEditable()); - bool can_add = self && tabs->getTabCount() < LLAgentBenefitsMgr::current().getPicksLimit(); + auto count = tabs->getTabCount(); + bool can_add = self && count < LLAgentBenefitsMgr::current().getPicksLimit(); LLView* view = getChildView("New..."); view->setEnabled(can_add // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) @@ -993,7 +994,7 @@ void LLPanelAvatarPicks::processProperties(void* data, EAvatarProcessorType type // [/RLVa:KB] view->setVisible(self && edit); view = getChildView("Delete..."); - view->setEnabled(can_add); + view->setEnabled(count); view->setVisible(self && edit); //For pick import/export - RK @@ -1001,7 +1002,7 @@ void LLPanelAvatarPicks::processProperties(void* data, EAvatarProcessorType type view->setVisible(self && edit); view->setEnabled(can_add); view = getChildView("Export..."); - view->setEnabled(can_add); + view->setEnabled(count); view->setVisible(self); childSetVisible("loading_text", false);