summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-01-30 12:05:35 +0100
committerGitHub <noreply@github.com>2019-01-30 12:05:35 +0100
commitc21ca98e4c6e6228adefcc696b3ff6a1104c678e (patch)
tree62883dc71c1c41077d12e5f25350431727a9d3eb
parent629ac20a14920a6576ecf645c3a1c5e8e162a4ab (diff)
parentee560dd987f5b6db27b903b6d911146b05514d60 (diff)
Merge pull request #25469 from ankitpriyarup/master
Fixes error when new name contains only unallowed characters
-rw-r--r--editor/scene_tree_editor.cpp5
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);
}