Keep the swapped childs if the copies when doing a variant switch

This commit is contained in:
Pablo Alba 2025-06-26 11:54:31 +02:00 committed by Pablo Alba
parent 4fddf34a73
commit a44c70ef69
9 changed files with 197 additions and 34 deletions

View file

@ -975,10 +975,11 @@
[new-shape all-parents changes]
(-> (pcb/empty-changes it (:id page))
(pcb/set-undo-group undo-group)
(cll/generate-component-swap objects shape ldata page libraries id-new-component index target-cell keep-props-values))
(cll/generate-component-swap objects shape ldata page libraries id-new-component
index target-cell keep-props-values keep-touched?))
changes (if keep-touched?
(clv/generate-keep-touched changes new-shape shape orig-shapes page libraries)
(clv/generate-keep-touched changes new-shape shape orig-shapes page libraries ldata)
changes)]
(rx/of