0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-13 15:31:26 -05:00

🐛 Fix problem with position-data overriding in copies

This commit is contained in:
alonso.torres 2024-04-12 15:21:30 +02:00
parent 8e71d219ca
commit 4838571ec2

View file

@ -1491,9 +1491,22 @@
container
{:type :reg-objects
:shapes all-parents})]))))
(let [roperation {:type :set
(let [;; position-data is a special case because can be affected by :geometry-group and :content-group
;; so, if the position-data changes but the geometry is touched we need to reset the position-data
;; so it's calculated again
reset-pos-data?
(and (cfh/text-shape? origin-shape)
(= attr :position-data)
(not= (get origin-shape attr) (get dest-shape attr))
(touched :geometry-group))
roperation {:type :set
:attr attr
:val (get origin-shape attr)
:val (cond
;; If position data changes and the geometry group is touched
;; we need to put to nil so we can regenerate it
reset-pos-data? nil
:else (get origin-shape attr))
:ignore-touched true}
uoperation {:type :set
:attr attr