Merge pull request #35078 from akien-mga/animation-editor-duplicate-name

Animation editor: Set resource name when duplicating
This commit is contained in:
Rémi Verschelde 2020-01-13 14:00:37 +01:00 committed by GitHub
commit 087ffc8b5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -997,9 +997,9 @@ void AnimationPlayerEditor::_animation_duplicate() {
String new_name = current;
while (player->has_animation(new_name)) {
new_name = new_name + " (copy)";
}
new_anim->set_name(new_name);
undo_redo->create_action(TTR("Duplicate Animation"));
undo_redo->add_do_method(player, "add_animation", new_name, new_anim);