summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDualMatrix <piet.goris@gmail.com>2018-09-01 13:56:17 +0200
committerDualMatrix <piet.goris@gmail.com>2018-09-01 13:56:17 +0200
commita35286e24bb344b06dbd79c42148c911d888e7d6 (patch)
tree090e4a7de02ca48f69f1284d3fab2f67e2c72ee6 /core
parent2ba42b709541928aaaa0312077d5b9cacdb696a5 (diff)
Fixed duplicating AnimationPlayers leaving empty tracks.
Fixed duplicating AnimationPlayers leaving empty tracks. I don't think duplicating arrays worked before. There was even this weird //does not make a long of sense but should work comment at the changed line. Fixes #21616
Diffstat (limited to 'core')
-rw-r--r--core/resource.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/resource.cpp b/core/resource.cpp
index 3078eb135a..f447f785b1 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -230,7 +230,7 @@ Ref<Resource> Resource::duplicate(bool p_subresources) const {
Variant p = get(E->get().name);
if ((p.get_type() == Variant::DICTIONARY || p.get_type() == Variant::ARRAY)) {
- p = p.duplicate(p_subresources); //does not make a long of sense but should work?
+ r->set(E->get().name, p.duplicate(p_subresources));
} else if (p.get_type() == Variant::OBJECT && (p_subresources || (E->get().usage & PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE))) {
RES sr = p;