🐛 Propagate tokens after creating new instances

This commit is contained in:
Andrés Moya 2026-08-31 10:00:34 +02:00
parent 6a34947586
commit b3a946eaeb

View File

@ -656,6 +656,7 @@
(merge (meta it)))) (merge (meta it))))
(dwu/start-undo-transaction undo-id) (dwu/start-undo-transaction undo-id)
(dch/commit-changes changes) (dch/commit-changes changes)
(dwtp/propagate-workspace-tokens) ;; Make the new instance get the token values from the current file, not from the component's library
(ptk/data-event :layout/update {:ids [(:id new-shape)]}) (ptk/data-event :layout/update {:ids [(:id new-shape)]})
(dws/select-shapes (d/ordered-set (:id new-shape))) (dws/select-shapes (d/ordered-set (:id new-shape)))
(when start-move? (when start-move?
@ -1098,6 +1099,7 @@
(rx/of (rx/of
(dwu/start-undo-transaction undo-id) (dwu/start-undo-transaction undo-id)
(dch/commit-changes changes) (dch/commit-changes changes)
(dwtp/propagate-workspace-tokens) ;; Make the new instance get the token values from the current file, not from the component's library
(when (and (features/active-feature? state "render-wasm/v1") (when (and (features/active-feature? state "render-wasm/v1")
(seq new-text-ids)) (seq new-text-ids))
(dwwt/resize-wasm-text-all new-text-ids)) (dwwt/resize-wasm-text-all new-text-ids))