mirror of
https://github.com/penpot/penpot.git
synced 2025-01-07 15:39:42 -05:00
Merge pull request #2411 from penpot/hiru-bug-sync-undo
🐛 Fix component sync in undo
This commit is contained in:
commit
bcd9aa7ba7
2 changed files with 4 additions and 3 deletions
|
@ -150,7 +150,8 @@
|
|||
:hint-origin (ptk/type origin)
|
||||
:changes redo-changes
|
||||
:page-id page-id
|
||||
:frames frames})
|
||||
:frames frames
|
||||
:save-undo? save-undo?})
|
||||
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
|
|
|
@ -842,11 +842,11 @@
|
|||
|
||||
check-changes
|
||||
(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))
|
||||
#{}
|
||||
changes)]
|
||||
(when (d/not-empty? components-changed)
|
||||
(when (and (d/not-empty? components-changed) save-undo?)
|
||||
(log/info :msg "DETECTED COMPONENTS CHANGED"
|
||||
:ids (map str components-changed))
|
||||
(run! st/emit!
|
||||
|
|
Loading…
Reference in a new issue