mirror of
https://github.com/penpot/penpot.git
synced 2026-04-26 19:58:09 +00:00
🐛 Fix ordering on undo operation on adding/duplicating shape.
This commit is contained in:
parent
112140c006
commit
c66b483fba
@ -1046,14 +1046,12 @@
|
||||
{:type :add-obj
|
||||
:id (:id obj)
|
||||
:frame-id frame-id
|
||||
:obj (assoc obj :frame-id frame-id)
|
||||
:session-id (:session-id state)}))
|
||||
:obj (assoc obj :frame-id frame-id)}))
|
||||
(:shapes frame))
|
||||
|
||||
uchanges (mapv (fn [rch]
|
||||
{:type :del-obj
|
||||
:id (:id rch)
|
||||
:session-id (:session-id state)})
|
||||
:id (:id rch)})
|
||||
rchanges)
|
||||
|
||||
shapes (mapv :id rchanges)
|
||||
@ -1071,7 +1069,7 @@
|
||||
:id frame-id
|
||||
:session-id (:session-id state)}]
|
||||
(rx/of (commit-changes (d/concat [rchange] rchanges)
|
||||
(d/concat [uchange] uchanges)
|
||||
(d/concat [] uchanges [uchange])
|
||||
{:commit-local? true}))))))
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user