Pārlūkot izejas kodu

Animation editor: Set resource name when duplicating

Fixes #25156.
Rémi Verschelde 5 gadi atpakaļ
vecāks
revīzija
4a95186b4b
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      editor/plugins/animation_player_editor_plugin.cpp

+ 1 - 1
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);