diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index e408085537e..4c0e2b06524 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -541,7 +541,7 @@ void SceneTreeEditor::_node_removed(Node *p_node) { } void SceneTreeEditor::_node_renamed(Node *p_node) { - if (!get_scene_node()->is_a_parent_of(p_node)) { + if (p_node != get_scene_node() && !get_scene_node()->is_a_parent_of(p_node)) { return; }