🐛 Fix issue when undo after changing the artboard of a shape

This commit is contained in:
alonso.torres 2021-03-09 12:49:31 +01:00
parent 47e0c2c75b
commit d263dd52e9
4 changed files with 17 additions and 5 deletions

View file

@ -249,14 +249,15 @@
:parent-id frame-id
:shapes (mapv :id moving-shapes)}]
moving-shapes-by-frame-id (group-by :frame-id moving-shapes)
uch (->> moving-shapes-by-frame-id
(mapv (fn [[frame-id shapes]]
uch (->> moving-shapes
(reverse)
(mapv (fn [shape]
{:type :mov-objects
:page-id page-id
:parent-id frame-id
:shapes (mapv :id shapes)})))]
:parent-id (:parent-id shape)
:index (cp/get-index-in-parent objects (:id shape))
:shapes [(:id shape)]})))]
(when-not (empty? rch)
(rx/of dwc/pop-undo-into-transaction