mirror of
https://github.com/godotengine/godot.git
synced 2025-01-18 20:40:57 +08:00
Invalid node name should check if new_name is empty then cancel rename, fixes 25226
This commit is contained in:
parent
92a3f11de6
commit
ee560dd987
@ -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 New Issue
Block a user