Fix animation resource name after duplication

This commit is contained in:
Haoyu Qiu 2022-03-05 21:00:34 +08:00
parent cdd63fa872
commit 8dc12135cd

View file

@ -547,6 +547,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
Ref<Animation> anim = player->get_animation(current);
Ref<Animation> new_anim = _animation_clone(anim);
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);