diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-19 09:22:33 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-19 09:22:33 +0200 |
commit | ec193432dd0b773bb7b05989d2d8fab85a04b15c (patch) | |
tree | 0514d679df1c8edf323952aa4a78747104f60661 | |
parent | 908795301b9e4fcf24b115329a48d7d295c13a1a (diff) | |
parent | 65f97c671c0b9b1ff1bbe1fba72153752c04dc96 (diff) |
Merge pull request #66047 from Rindbee/improve-TabContainer
Make the inner `TabBar` in a `TabContainer` behave like it is in a `Container`
-rw-r--r-- | scene/gui/tab_container.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 1df698a108..ab4808d312 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<Control>(p_child); if (!c || c->is_set_as_top_level()) { return; |