Merge pull request #45123 from qarmin/errors_tab_container

Fix errors when removing non Control node from TabContainer
This commit is contained in:
Rémi Verschelde 2021-01-12 12:56:13 +01:00 committed by GitHub
commit bd07c5b7a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -789,6 +789,10 @@ Control *TabContainer::get_current_tab_control() const {
void TabContainer::remove_child_notify(Node *p_child) {
Container::remove_child_notify(p_child);
if (!Object::cast_to<Control>(p_child)) {
return;
}
call_deferred("_update_current_tab");
p_child->disconnect("renamed", callable_mp(this, &TabContainer::_child_renamed_callback));