From b6fed69d89f30cae85dadbde8031f5880981a5ac Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Mon, 6 Feb 2023 23:09:44 -0500 Subject: [PATCH] Fix places panel to not cause findChild stall --- indra/newview/llpanelplaces.cpp | 11 +++++++---- indra/newview/llpanelplaces.h | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index c2cf1416f79..1ded690b154 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -380,6 +380,9 @@ BOOL LLPanelPlaces::postBuild() mOptionLP = getChild<LLLayoutPanel>("lp_options"); mLayoutPanel2 = getChild<LLLayoutPanel>("lp2"); + mAddBtnPanel = getChild<LLUICtrl>("add_btn_panel"); + mTrashBtnPanel = getChild<LLUICtrl>("trash_btn_panel"); + createTabs(); updateVerbs(); @@ -663,10 +666,10 @@ void LLPanelPlaces::onTabSelected() // History panel does not support deletion nor creation // Hide menus bool supports_create = mActivePanel->getCreateMenu() != NULL; - childSetVisible("add_btn_panel", supports_create); + mAddBtnPanel->setVisible(supports_create); // favorites and inventory can remove items, history can clear history - childSetVisible("trash_btn_panel", TRUE); + mTrashBtnPanel->setVisible(TRUE); if (supports_create) { @@ -1213,10 +1216,10 @@ void LLPanelPlaces::createTabs() // History panel does not support deletion nor creation // Hide menus bool supports_create = mActivePanel->getCreateMenu() != NULL; - childSetVisible("add_btn_panel", supports_create); + mAddBtnPanel->setVisible(supports_create); // favorites and inventory can remove items, history can clear history - childSetVisible("trash_btn_panel", TRUE); + mTrashBtnPanel->setVisible(TRUE); if (supports_create) { diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index e2e62819a2f..0f342cc1700 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -119,6 +119,8 @@ class LLPanelPlaces : public LLPanel LLPanelLandmarkInfo* mLandmarkInfo; LLLayoutPanel* mOptionLP = nullptr; LLLayoutPanel* mLayoutPanel2 = nullptr; + LLUICtrl* mAddBtnPanel = nullptr; + LLUICtrl* mTrashBtnPanel = nullptr; LLToggleableMenu* mPlaceMenu; LLToggleableMenu* mLandmarkMenu; -- GitLab