diff options
author | Mikael Hermansson <mikael@hermansson.io> | 2024-07-16 11:34:44 +0200 |
---|---|---|
committer | Mikael Hermansson <mikael@hermansson.io> | 2024-07-16 11:34:44 +0200 |
commit | 08ef14a037ab3d7f74c00d5b4f034417735e32ab (patch) | |
tree | 7f5b58a377d07327d9bcd0cbc92772665e9a0102 | |
parent | 97b8ad1af0f2b4a216f6f1263bef4fbc69e56c7b (diff) | |
download | redot-engine-08ef14a037ab3d7f74c00d5b4f034417735e32ab.tar.gz |
Fix animation library copy-paste not preserving resource reference
-rw-r--r-- | editor/plugins/animation_library_editor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/animation_library_editor.cpp b/editor/plugins/animation_library_editor.cpp index b07db993ba..38f8b16b34 100644 --- a/editor/plugins/animation_library_editor.cpp +++ b/editor/plugins/animation_library_editor.cpp @@ -561,7 +561,9 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int return; } - anim = anim->duplicate(); // Users simply dont care about referencing, so making a copy works better here. + if (!anim->get_path().is_resource_file()) { + anim = anim->duplicate(); // Users simply dont care about referencing, so making a copy works better here. + } String base_name; if (anim->get_name() != "") { |