mirror of
https://github.com/godotengine/godot.git
synced 2025-02-23 23:15:07 +08:00
Fix errors when removing non Control node from TabContainer
This commit is contained in:
parent
8e514bbf6a
commit
56734f44e5
@ -789,6 +789,10 @@ Control *TabContainer::get_current_tab_control() const {
|
|||||||
void TabContainer::remove_child_notify(Node *p_child) {
|
void TabContainer::remove_child_notify(Node *p_child) {
|
||||||
Container::remove_child_notify(p_child);
|
Container::remove_child_notify(p_child);
|
||||||
|
|
||||||
|
if (!Object::cast_to<Control>(p_child)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
call_deferred("_update_current_tab");
|
call_deferred("_update_current_tab");
|
||||||
|
|
||||||
p_child->disconnect("renamed", callable_mp(this, &TabContainer::_child_renamed_callback));
|
p_child->disconnect("renamed", callable_mp(this, &TabContainer::_child_renamed_callback));
|
||||||
|
Loading…
Reference in New Issue
Block a user