From aa9555cb63b6318b0f0c1468f2f037d0335dde14 Mon Sep 17 00:00:00 2001 From: joostdecock Date: Sat, 15 Apr 2023 17:54:56 +0200 Subject: [PATCH] fix(core): Proposal to fix #3781 This is an (untested) fix for #3781 It ensures a part's freeId is inherited when the part is injected. --- packages/core/src/part.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/src/part.mjs b/packages/core/src/part.mjs index 6c1579c5985..eaa047856b6 100644 --- a/packages/core/src/part.mjs +++ b/packages/core/src/part.mjs @@ -295,6 +295,7 @@ Part.prototype.__getIdClosure = function () { /** * Copies point/path/snippet data from part orig into this + * Also sets the freeId * * @private * @param {object} orig - The original part to inject into this @@ -307,6 +308,7 @@ Part.prototype.__inject = function (orig) { } } + this.freeId = orig.freeId for (let i in orig.points) this.points[i] = orig.points[i].clone() for (let i in orig.paths) { this.paths[i] = orig.paths[i].clone()