2
0
Fork 0

Invalid node name should check if new_name is empty then cancel rename, fixes 25226

3.1
Ankit Priyarup 2019-01-29 22:21:50 +07:00
parent 92a3f11de6
commit ee560dd987
1 changed files with 5 additions and 0 deletions

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