mirror of
https://github.com/penpot/penpot.git
synced 2025-05-16 18:47:15 +02:00
🐛 Fix bug on undo deletion of canvas with shapes.
This commit is contained in:
parent
6f0d45dfcd
commit
203a165502
1 changed files with 3 additions and 1 deletions
|
@ -1257,6 +1257,8 @@
|
||||||
(let [objects (get-in state [:workspace-data :objects])
|
(let [objects (get-in state [:workspace-data :objects])
|
||||||
session-id (:session-id state)
|
session-id (:session-id state)
|
||||||
|
|
||||||
|
ids (seq ids)
|
||||||
|
|
||||||
rchanges (mapv #(array-map :type :del-obj :id %) ids)
|
rchanges (mapv #(array-map :type :del-obj :id %) ids)
|
||||||
uchanges (mapv (fn [id]
|
uchanges (mapv (fn [id]
|
||||||
(let [obj (get objects id)
|
(let [obj (get objects id)
|
||||||
|
@ -1267,7 +1269,7 @@
|
||||||
:frame-id (:id frm)
|
:frame-id (:id frm)
|
||||||
:index idx
|
:index idx
|
||||||
:obj obj}))
|
:obj obj}))
|
||||||
ids)]
|
(reverse ids))]
|
||||||
(rx/of (commit-changes rchanges uchanges {:commit-local? true}))))))
|
(rx/of (commit-changes rchanges uchanges {:commit-local? true}))))))
|
||||||
|
|
||||||
(defn- delete-frame
|
(defn- delete-frame
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue