summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneloutfitsinventory.cpp
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-07-25 23:24:39 -0400
committerRye Mutt <rye@alchemyviewer.org>2024-07-25 23:24:39 -0400
commit10e5e5694668a5376378dc487b54f1045080e47e (patch)
tree136d099a5db45b5270ccb3b234b597795dc88f19 /indra/newview/llpaneloutfitsinventory.cpp
parent005f3bd62a73040fe9a9c447f697e70a3d918bd4 (diff)
Reduce findChild stalls in appearance floater
Diffstat (limited to 'indra/newview/llpaneloutfitsinventory.cpp')
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 5b595a48b7..b226c2ca1a 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -252,7 +252,8 @@ void LLPanelOutfitsInventory::openApearanceTab(const std::string& tab_name)
void LLPanelOutfitsInventory::initListCommandsHandlers()
{
mListCommands = getChild<LLPanel>("bottom_panel");
- mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this));
+ mWearBtn = mListCommands->getChild<LLButton>("wear_btn");
+ mWearBtn->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this));
mMyOutfitsPanel->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this));
mOutfitGalleryPanel->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this));
}
@@ -263,14 +264,13 @@ void LLPanelOutfitsInventory::updateListCommands()
bool wear_enabled = isActionEnabled("wear");
bool wear_visible = !isCOFPanelActive();
bool make_outfit_enabled = isActionEnabled("save_outfit");
-
- LLButton* wear_btn = mListCommands->getChild<LLButton>("wear_btn");
+
mMyOutfitsPanel->childSetEnabled("trash_btn", trash_enabled);
mOutfitGalleryPanel->childSetEnabled("trash_btn", trash_enabled);
- wear_btn->setEnabled(wear_enabled);
- wear_btn->setVisible(wear_visible);
+ mWearBtn->setEnabled(wear_enabled);
+ mWearBtn->setVisible(wear_visible);
getChild<LLButton>(SAVE_BTN)->setEnabled(make_outfit_enabled);
- wear_btn->setToolTip(getString((!isOutfitsGalleryPanelActive() && mMyOutfitsPanel->hasItemSelected()) ? "wear_items_tooltip" : "wear_outfit_tooltip"));
+ mWearBtn->setToolTip(getString((!isOutfitsGalleryPanelActive() && mMyOutfitsPanel->hasItemSelected()) ? "wear_items_tooltip" : "wear_outfit_tooltip"));
}
void LLPanelOutfitsInventory::onTrashButtonClick()