1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Fix AnimationLibrary name validation

This commit is contained in:
Haoyu Qiu
2022-04-19 17:04:48 +08:00
parent 1d2177938d
commit d8fed8fb69
4 changed files with 26 additions and 8 deletions

View File

@@ -427,7 +427,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
player->stop();
String new_name = name->get_text();
if (new_name.is_empty() || new_name.contains(":") || new_name.contains("/")) {
if (!AnimationLibrary::is_valid_name(new_name)) {
error_dialog->set_text(TTR("Invalid animation name!"));
error_dialog->popup_centered();
return;