mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -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)
|
(map-indexed vector)
|
||||||
(filter #(#{(:id group)} (second %)))
|
(filter #(#{(:id group)} (second %)))
|
||||||
(ffirst)
|
(ffirst)
|
||||||
inc)
|
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)))]
|
|
||||||
|
|
||||||
(-> (pcb/empty-changes it page-id)
|
(-> (pcb/empty-changes it page-id)
|
||||||
(pcb/with-objects objects)
|
(pcb/with-objects objects)
|
||||||
(pcb/change-parent parent-id children index-in-parent)
|
(pcb/change-parent parent-id children index-in-parent)
|
||||||
(pcb/remove-objects [(:id group)])
|
(pcb/remove-objects [(:id group)]))))
|
||||||
(pcb/update-shapes (map :id shapes-to-detach) ctk/detach-shape))))
|
|
||||||
|
|
||||||
(defn remove-frame-changes
|
(defn remove-frame-changes
|
||||||
[it page-id frame objects]
|
[it page-id frame objects]
|
||||||
|
|
Loading…
Add table
Reference in a new issue