From 4b8783c104789f5a45f24d8dbc8ecf85d9206b8a Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Fri, 9 Jun 2023 13:22:38 +0200 Subject: [PATCH] :bug: Fix problem with paste objects --- frontend/src/app/main/data/workspace.cljs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index f74ae2c763..b2e9436e75 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -1822,10 +1822,7 @@ (when (ctl/grid-layout? all-objects parent-id) (gslg/get-drop-cell frame-id all-objects mouse-pos)) - changes - (-> (pcb/resize-parents changes new-objects-ids) - (cond-> (some? drop-cell) - (pcb/update-shapes [parent-id] #(ctl/add-children-to-cell % (into (d/ordered-set) new-objects-ids) all-objects drop-cell)))) + changes (pcb/resize-parents changes new-objects-ids) selected (->> changes :redo-changes @@ -1833,6 +1830,13 @@ (filter #(selected (:old-id %))) (map #(get-in % [:obj :id])) (into (d/ordered-set))) + + changes + (cond-> changes + (some? drop-cell) + (pcb/update-shapes [parent-id] + #(ctl/add-children-to-cell % selected all-objects drop-cell))) + undo-id (js/Symbol)] (rx/of (dwu/start-undo-transaction undo-id)