From 7c10ef724476a9025604e829a8b564811784c8e7 Mon Sep 17 00:00:00 2001 From: cinder <cinder@cinderblocks.biz> Date: Sun, 4 Dec 2022 16:40:33 -0600 Subject: [PATCH] Don't pretend you don't love set_child_visible() --- indra/llui/llpanel.cpp | 5 +++++ indra/llui/llpanel.h | 1 + 2 files changed, 6 insertions(+) diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 1605221cca7..91f4f1d29ab 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -877,3 +877,8 @@ LLPanel* LLPanel::createFactoryPanel(const std::string& name) LLPanel::Params panel_p; return LLUICtrlFactory::create<LLPanel>(panel_p); } + +void set_child_visible(LLView* parent, const std::string& child_name, bool visible) +{ + parent->getChildView(child_name)->setVisible(visible); +} diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index eb7fe7e1a05..772b6f20ce9 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -313,5 +313,6 @@ template<typename T> LLRegisterPanelClass::instanceFast().addPanelClass(tag,&LLRegisterPanelClass::defaultPanelClassBuilder<T>); } +void set_child_visible(LLView* parent, const std::string& child_name, bool visible); #endif -- GitLab