0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

🐛 Fix problem with changes builder

This commit is contained in:
alonso.torres 2023-09-20 09:35:05 +02:00 committed by Andrey Antukh
parent c23cf2a5a6
commit 9d6bd64027

View file

@ -376,14 +376,23 @@
attrs (seq attrs)] attrs (seq attrs)]
(if-let [attr (first attrs)] (if-let [attr (first attrs)]
(let [old-val (get old attr) (let [old-val (get old attr)
new-val (get new attr)] new-val (get new attr)
changed? (not= old-val new-val)
(recur (conj rops {:type :set :attr attr :val new-val rops
(cond-> rops
changed?
(conj {:type :set :attr attr :val new-val
:ignore-geometry ignore-geometry? :ignore-geometry ignore-geometry?
:ignore-touched ignore-touched}) :ignore-touched ignore-touched}))
(conj uops {:type :set :attr attr :val old-val
:ignore-touched true}) uops
(rest attrs))) (cond-> uops
changed?
(conj {:type :set :attr attr :val old-val
:ignore-touched true}))]
(recur rops uops (rest attrs)))
[rops uops]))) [rops uops])))
update-shape update-shape