diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 94ef712c251..2fab78e8c06 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -573,8 +573,10 @@ void SceneTreeEditor::set_selected(Node *p_node, bool p_emit_selected) { selected = NULL; _update_tree(); selected = p_node; - if (p_emit_selected) - emit_signal("node_selected"); + } + + if (p_emit_selected) { + emit_signal("node_selected"); } }