Browse Source

Fix animation resource name after duplication

(cherry picked from commit 8dc12135cd42a8742d77c3f3267181af1da85da1)
Haoyu Qiu 3 years ago
parent
commit
2ccd4fd030
1 changed files with 1 additions and 0 deletions
  1. 1 0
      editor/plugins/animation_player_editor_plugin.cpp

+ 1 - 0
editor/plugins/animation_player_editor_plugin.cpp

@@ -549,6 +549,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
 				}
 			}
 			new_anim->set_path("");
+			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);