0
Fork 0
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:
Andrey Antukh 2020-03-23 15:26:40 +01:00
parent 112140c006
commit c66b483fba

View file

@ -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}))))))