diff options
author | Tefatika <692720+Tefatika@users.noreply.github.com> | 2023-04-30 00:11:58 +0200 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2023-05-12 12:07:00 +0200 |
commit | b532dd7626be320a83148de8e6c4469ee24391ca (patch) | |
tree | 2b1bf603cc7a352ab44f17452ead63fa98489db6 /scene/gui | |
parent | e58001bd0d2eee1b174a0d8bd21ea18f97f25778 (diff) |
Fixed error messages when setting all_tab_in_front of TabContainer
Some signal handlers weren't unregistered when removing the wrapped
child TabBar, which resulted in errors printed when the TabBar was
removed and added again when the flag was updated
(cherry picked from commit abd894daf794828986b9450cf7d0ef50d37dab06)
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/tab_container.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 208cb29772..c5f7500380 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -547,12 +547,12 @@ void TabContainer::add_child_notify(Node *p_child) { } void TabContainer::move_child_notify(Node *p_child) { + Container::move_child_notify(p_child); + if (p_child == tab_bar) { return; } - Container::move_child_notify(p_child); - Control *c = Object::cast_to<Control>(p_child); if (c && !c->is_set_as_top_level()) { int old_idx = -1; @@ -571,12 +571,12 @@ void TabContainer::move_child_notify(Node *p_child) { } void TabContainer::remove_child_notify(Node *p_child) { + Container::remove_child_notify(p_child); + if (p_child == tab_bar) { return; } - Container::remove_child_notify(p_child); - Control *c = Object::cast_to<Control>(p_child); if (!c || c->is_set_as_top_level()) { return; |