mirror of
https://github.com/penpot/penpot.git
synced 2025-05-13 16:06:37 +02:00
🐛 Fix problem with undo
This commit is contained in:
parent
4405bd95f9
commit
4118e53d7d
1 changed files with 3 additions and 1 deletions
|
@ -69,6 +69,7 @@
|
||||||
(watch [_ state stream]
|
(watch [_ state stream]
|
||||||
(let [page-id (:current-page-id state)
|
(let [page-id (:current-page-id state)
|
||||||
objects (get-in state [:workspace-data :pages-index page-id :objects])
|
objects (get-in state [:workspace-data :pages-index page-id :objects])
|
||||||
|
objects' (get-in state [:workspace-file :data :pages-index page-id :objects])
|
||||||
reg-objects {:type :reg-objects :page-id page-id :shapes (vec ids)}]
|
reg-objects {:type :reg-objects :page-id page-id :shapes (vec ids)}]
|
||||||
(loop [ids (seq ids)
|
(loop [ids (seq ids)
|
||||||
rch []
|
rch []
|
||||||
|
@ -84,8 +85,9 @@
|
||||||
(let [id (first ids)
|
(let [id (first ids)
|
||||||
obj1 (get objects id)
|
obj1 (get objects id)
|
||||||
obj2 (f obj1)
|
obj2 (f obj1)
|
||||||
|
obj3 (get objects' id)
|
||||||
rch-operations (generate-operations obj1 obj2)
|
rch-operations (generate-operations obj1 obj2)
|
||||||
uch-operations (generate-operations obj2 obj1 true)
|
uch-operations (generate-operations obj2 obj3 true)
|
||||||
rchg {:type :mod-obj
|
rchg {:type :mod-obj
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:operations rch-operations
|
:operations rch-operations
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue