From 65f97c671c0b9b1ff1bbe1fba72153752c04dc96 Mon Sep 17 00:00:00 2001 From: Rindbee Date: Sun, 18 Sep 2022 20:55:04 +0800 Subject: [PATCH] Make the inner TabBar in a TabContainer behave as if it were in a Container --- scene/gui/tab_container.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 1df698a1083..ab4808d312c 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -519,12 +519,12 @@ void TabContainer::_refresh_tab_names() { } void TabContainer::add_child_notify(Node *p_child) { + Container::add_child_notify(p_child); + if (p_child == tab_bar) { return; } - Container::add_child_notify(p_child); - Control *c = Object::cast_to(p_child); if (!c || c->is_set_as_top_level()) { return;