From a019641e735372c65eff8f1c2fbf756bdee5ada6 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Sun, 26 May 2019 20:05:02 +0200 Subject: [PATCH] Deselect hidden nodes on filter --- editor/scene_tree_editor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index e3ad7400059..5ca34486936 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -379,6 +379,12 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { } if (!keep) { + if (editor_selection) { + Node *n = get_node(item->get_metadata(0)); + if (n) { + editor_selection->remove_node(n); + } + } memdelete(item); return false; } else {