Merge pull request #36613 from akien-mga/tab-container-add-child-fix

Signals: tab_changed now is emitted when it's on scene tree
This commit is contained in:
Rémi Verschelde 2020-02-27 21:52:51 +01:00 committed by GitHub
commit e66d519286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -538,7 +538,7 @@ void TabContainer::add_child_notify(Node *p_child) {
update(); update();
p_child->connect_compat("renamed", this, "_child_renamed_callback"); p_child->connect_compat("renamed", this, "_child_renamed_callback");
if (first) if (first && is_inside_tree())
emit_signal("tab_changed", current); emit_signal("tab_changed", current);
} }