From 4a95186b4bd7a911d4466b015bef04733f8074b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 13 Jan 2020 13:21:46 +0100 Subject: Animation editor: Set resource name when duplicating Fixes #25156. --- editor/plugins/animation_player_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 5b41da6e8e..5e69ce4e69 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -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); -- cgit v1.2.3