From 6901acb37e79974f132146b60b85cdb031e9025f Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 25 Apr 2024 19:50:22 +0200 Subject: [PATCH] :bug: Fix ungrouping detach components --- frontend/src/app/main/data/workspace/groups.cljs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/main/data/workspace/groups.cljs b/frontend/src/app/main/data/workspace/groups.cljs index c3a4032694..bbda31ecc7 100644 --- a/frontend/src/app/main/data/workspace/groups.cljs +++ b/frontend/src/app/main/data/workspace/groups.cljs @@ -143,18 +143,12 @@ (map-indexed vector) (filter #(#{(:id group)} (second %))) (ffirst) - inc) - - ;; Shapes that are in a component (including root) must be detached, - ;; because cannot be easyly synchronized back to the main component. - shapes-to-detach (filter ctk/in-component-copy? - (cfh/get-children-with-self objects (:id group)))] + inc)] (-> (pcb/empty-changes it page-id) (pcb/with-objects objects) (pcb/change-parent parent-id children index-in-parent) - (pcb/remove-objects [(:id group)]) - (pcb/update-shapes (map :id shapes-to-detach) ctk/detach-shape)))) + (pcb/remove-objects [(:id group)])))) (defn remove-frame-changes [it page-id frame objects]