You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Merge pull request #66047 from Rindbee/improve-TabContainer
Make the inner `TabBar` in a `TabContainer` behave like it is in a `Container`
This commit is contained in:
@@ -519,12 +519,12 @@ void TabContainer::_refresh_tab_names() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TabContainer::add_child_notify(Node *p_child) {
|
void TabContainer::add_child_notify(Node *p_child) {
|
||||||
|
Container::add_child_notify(p_child);
|
||||||
|
|
||||||
if (p_child == tab_bar) {
|
if (p_child == tab_bar) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Container::add_child_notify(p_child);
|
|
||||||
|
|
||||||
Control *c = Object::cast_to<Control>(p_child);
|
Control *c = Object::cast_to<Control>(p_child);
|
||||||
if (!c || c->is_set_as_top_level()) {
|
if (!c || c->is_set_as_top_level()) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user