mirror of
https://github.com/penpot/penpot.git
synced 2025-05-05 11:45:54 +02: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
|
{:type :add-obj
|
||||||
:id (:id obj)
|
:id (:id obj)
|
||||||
:frame-id frame-id
|
:frame-id frame-id
|
||||||
:obj (assoc obj :frame-id frame-id)
|
:obj (assoc obj :frame-id frame-id)}))
|
||||||
:session-id (:session-id state)}))
|
|
||||||
(:shapes frame))
|
(:shapes frame))
|
||||||
|
|
||||||
uchanges (mapv (fn [rch]
|
uchanges (mapv (fn [rch]
|
||||||
{:type :del-obj
|
{:type :del-obj
|
||||||
:id (:id rch)
|
:id (:id rch)})
|
||||||
:session-id (:session-id state)})
|
|
||||||
rchanges)
|
rchanges)
|
||||||
|
|
||||||
shapes (mapv :id rchanges)
|
shapes (mapv :id rchanges)
|
||||||
|
@ -1071,7 +1069,7 @@
|
||||||
:id frame-id
|
:id frame-id
|
||||||
:session-id (:session-id state)}]
|
:session-id (:session-id state)}]
|
||||||
(rx/of (commit-changes (d/concat [rchange] rchanges)
|
(rx/of (commit-changes (d/concat [rchange] rchanges)
|
||||||
(d/concat [uchange] uchanges)
|
(d/concat [] uchanges [uchange])
|
||||||
{:commit-local? true}))))))
|
{:commit-local? true}))))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue