0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-23 15:26:29 -05:00

Merge pull request #2638 from penpot/superalex-fix-move-the-content-of-a-group-generates-orphan-elements

🐛 Fix move content of a group generates orphan elements
This commit is contained in:
Pablo Alba 2022-12-07 08:57:19 +01:00 committed by GitHub
commit cb7354a19c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -778,8 +778,10 @@
(recursive-find-empty-parents parents))))
empty-parents
;; Any parent whose children are moved should be deleted
(into (d/ordered-set) (find-all-empty-parents #{}))
;; Any empty parent whose children are moved to another frame should be deleted
(if (empty? moving-shapes)
#{}
(into (d/ordered-set) (find-all-empty-parents #{})))
changes
(-> (pcb/empty-changes it page-id)