diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/scene_tree_editor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 7e4baa1533..6602d2974f 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -678,6 +678,11 @@ void SceneTreeEditor::_renamed() { error->set_text(TTR("Invalid node name, the following characters are not allowed:") + "\n" + Node::invalid_character); error->popup_centered_minsize(); + if (new_name.empty()) { + which->set_text(0, n->get_name()); + return; + } + which->set_text(0, new_name); } |