From 6b20d98aaac093e043c6e23fbcf6d4e1f62d13ba Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 24 Jul 2024 23:12:44 -0400 Subject: Fix one more group findChild stall --- indra/newview/llpanelgroup.cpp | 16 ++++++++-------- indra/newview/llpanelgroup.h | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 598df0135e..3db0f90df8 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -169,6 +169,8 @@ bool LLPanelGroup::postBuild() mButtonCancel = getChild("btn_cancel"); + mGroupNameCtrl = getChild("group_name"); + childSetCommitCallback("back",boost::bind(&LLPanelGroup::onBackBtnClick,this),NULL); LLPanelGroupTab* panel_general = findChild("group_general_tab_panel"); @@ -311,9 +313,8 @@ void LLPanelGroup::update(LLGroupChange gc) if(gdatap) { std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName; - LLUICtrl* group_name_ctrl = getChild("group_name"); - group_name_ctrl->setValue(group_name); - group_name_ctrl->setToolTip(group_name); + mGroupNameCtrl->setValue(group_name); + mGroupNameCtrl->setToolTip(group_name); LLGroupData agent_gdatap; bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlikeWithoutAdminMenuFakery(); @@ -365,9 +366,8 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) if(gdatap) { std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName; - LLUICtrl* group_name_ctrl = getChild("group_name"); - group_name_ctrl->setValue(group_name); - group_name_ctrl->setToolTip(group_name); + mGroupNameCtrl->setValue(group_name); + mGroupNameCtrl->setToolTip(group_name); } bool is_null_group_id = group_id == LLUUID::null; @@ -417,7 +417,7 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) tab_land->setVisible(false); tab_experiences->setVisible(false); - getChild("group_name")->setVisible(false); + mGroupNameCtrl->setVisible(false); getChild("group_name_editor")->setVisible(true); if(mButtonCall) @@ -449,7 +449,7 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) tab_land->setVisible(is_member); tab_experiences->setVisible(is_member); - getChild("group_name")->setVisible(true); + mGroupNameCtrl->setVisible(true); getChild("group_name_editor")->setVisible(false); if(mButtonApply) diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index 1dbc8c32ff..d7dec94c60 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -117,6 +117,7 @@ protected: LLAccordionCtrl* mGroupsAccordion = nullptr; + LLUICtrl* mGroupNameCtrl = nullptr; LLButton* mButtonJoin = nullptr; LLButton* mButtonApply = nullptr; LLButton* mButtonCall = nullptr; -- cgit v1.2.3