mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 07:29:08 -05:00
🐛 Fix ordering on undo operation on adding/duplicating shape.
This commit is contained in:
parent
112140c006
commit
c66b483fba
1 changed files with 3 additions and 5 deletions
|
@ -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…
Add table
Reference in a new issue