Fix errors during filtering Nodes in the editor.

This commit is contained in:
Relintai 2024-02-08 22:42:42 +01:00
parent f4118ae3fb
commit a5fcaa536f

View File

@ -655,8 +655,6 @@ bool SceneTreeEditor::_update_filter(TreeItem *p_parent, bool p_scroll_to_select
}
}
}
} else {
memdelete(p_parent);
}
if (editor_selection) {
@ -673,6 +671,11 @@ bool SceneTreeEditor::_update_filter(TreeItem *p_parent, bool p_scroll_to_select
}
}
if (!(keep_for_children || keep)) {
memdelete(p_parent);
return false;
}
return keep || keep_for_children;
}