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:
parent
e0fe7181f1
commit
6901acb37e
1 changed files with 2 additions and 8 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Reference in a new issue