Invalid node name should check if new_name is empty then cancel rename, fixes 25226
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue