diff --git a/editor/gui/scene_tree_editor.cpp b/editor/gui/scene_tree_editor.cpp index f826d40226a9..934bdc0beaed 100644 --- a/editor/gui/scene_tree_editor.cpp +++ b/editor/gui/scene_tree_editor.cpp @@ -369,7 +369,7 @@ void SceneTreeEditor::_update_node_subtree(Node *p_node, TreeItem *p_parent, boo item->set_selectable(0, false); item->deselect(0); if (selected == p_node) { - set_selected(nullptr, false); + selected = nullptr; } } }