Merge pull request #2749 from penpot/hiru-fix-ghost-sync

🐛 Fix ghost shapes after sync groups in components
This commit is contained in:
Eva Marco 2023-01-09 16:20:20 +01:00 committed by GitHub
commit 35aa391129
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 19 deletions

View file

@ -39,6 +39,7 @@
- Fix group/ungroup shapes inside a component [Taiga #4052](https://tree.taiga.io/project/penpot/issue/4052)
- Fix wrong update of text in components [Taiga #4646](https://tree.taiga.io/project/penpot/issue/4646)
- Fix problem with SVG imports with style [#2605](https://github.com/penpot/penpot/issues/2605)
- Fix ghost shapes after sync groups in components [Taiga #4649](https://tree.taiga.io/project/penpot/issue/4649)
## 1.16.2-beta

View file

@ -915,6 +915,15 @@
parents (cph/get-parent-ids objects (:id shape))
parent (first parents)
children (cph/get-children-ids objects (:id shape))
ids (into [(:id shape)] children)
add-redo-change (fn [changes id]
(update changes :redo-changes conj
(make-change
container
{:type :del-obj
:id id
:ignore-touched true})))
add-undo-change (fn [changes id]
(let [shape' (get objects id)]
@ -931,12 +940,7 @@
(:frame-id shape')
(assoc :frame-id (:frame-id shape'))))))))
changes' (-> changes
(update :redo-changes conj (make-change
container
{:type :del-obj
:id (:id shape)
:ignore-touched true}))
changes' (-> (reduce add-redo-change changes ids)
(update :redo-changes conj (make-change
container
{:type :reg-objects