0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

🐛 Fix ungrouping detach components

This commit is contained in:
Pablo Alba 2024-04-25 19:50:22 +02:00 committed by Andrés Moya
parent e0fe7181f1
commit 6901acb37e

View file

@ -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]