summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-01-13 14:00:37 +0100
committerGitHub <noreply@github.com>2020-01-13 14:00:37 +0100
commit087ffc8b5aafafba8fbb17d0689c0ceb88baa27a (patch)
tree85526d650a19e7c6db4f49a8e4bbd68c083e28cc
parent57e43af3a251e42dbf233687a49ecb2004e754f8 (diff)
parent4a95186b4bd7a911d4466b015bef04733f8074b1 (diff)
Merge pull request #35078 from akien-mga/animation-editor-duplicate-name
Animation editor: Set resource name when duplicating
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
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);