Merge pull request #25469 from ankitpriyarup/master

Fixes error when new name contains only unallowed characters
This commit is contained in:
Rémi Verschelde 2019-01-30 12:05:35 +01:00 committed by GitHub
commit c21ca98e4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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);
}