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

This commit is contained in:
Ankit Priyarup 2019-01-29 22:21:50 +05:30
parent 92a3f11de6
commit ee560dd987

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