mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 15:09:10 -05:00
🐛 Fix component sync in undo
This commit is contained in:
parent
da33d539bf
commit
66cd60e02c
2 changed files with 4 additions and 3 deletions
|
@ -150,7 +150,8 @@
|
||||||
:hint-origin (ptk/type origin)
|
:hint-origin (ptk/type origin)
|
||||||
:changes redo-changes
|
:changes redo-changes
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:frames frames})
|
:frames frames
|
||||||
|
:save-undo? save-undo?})
|
||||||
|
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
|
|
|
@ -842,11 +842,11 @@
|
||||||
|
|
||||||
check-changes
|
check-changes
|
||||||
(fn [[event data]]
|
(fn [[event data]]
|
||||||
(let [changes (-> event deref :changes)
|
(let [{:keys [changes save-undo?]} (deref event)
|
||||||
components-changed (reduce #(into %1 (ch/components-changed data %2))
|
components-changed (reduce #(into %1 (ch/components-changed data %2))
|
||||||
#{}
|
#{}
|
||||||
changes)]
|
changes)]
|
||||||
(when (d/not-empty? components-changed)
|
(when (and (d/not-empty? components-changed) save-undo?)
|
||||||
(log/info :msg "DETECTED COMPONENTS CHANGED"
|
(log/info :msg "DETECTED COMPONENTS CHANGED"
|
||||||
:ids (map str components-changed))
|
:ids (map str components-changed))
|
||||||
(run! st/emit!
|
(run! st/emit!
|
||||||
|
|
Loading…
Add table
Reference in a new issue