mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 09:16:12 +02:00
🐛 Fix undo on page relocate/sorting.
This commit is contained in:
parent
c4947d3737
commit
e7b4010eba
9 changed files with 89 additions and 33 deletions
|
@ -114,20 +114,20 @@
|
|||
:changes changes}))))
|
||||
|
||||
(defn commit-changes
|
||||
[{:keys [redo-changes undo-changes origin save-undo? file-id]
|
||||
:or {save-undo? true}}]
|
||||
|
||||
[{:keys [redo-changes undo-changes origin save-undo? file-id] :or {save-undo? true}}]
|
||||
(log/debug :msg "commit-changes"
|
||||
:js/redo-changes redo-changes
|
||||
:js/undo-changes undo-changes)
|
||||
(let [error (volatile! nil)
|
||||
strace (.-stack (ex-info "" {}))]
|
||||
|
||||
(let [error (volatile! nil)]
|
||||
(ptk/reify ::commit-changes
|
||||
cljs.core/IDeref
|
||||
(-deref [_]
|
||||
{:file-id file-id
|
||||
:hint-events @st/last-events
|
||||
:hint-origin (ptk/type origin)
|
||||
:hint-strace strace
|
||||
:changes redo-changes})
|
||||
|
||||
ptk/UpdateEvent
|
||||
|
@ -135,7 +135,6 @@
|
|||
(let [current-file-id (get state :current-file-id)
|
||||
file-id (or file-id current-file-id)
|
||||
path (if (= file-id current-file-id)
|
||||
|
||||
[:workspace-data]
|
||||
[:workspace-libraries file-id :data])]
|
||||
(try
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue