mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 07:29:08 -05:00
🐛 Preserve added or removed shapes on a component normal update
This commit is contained in:
parent
1ce68cb1cf
commit
0cfb66ae16
1 changed files with 21 additions and 11 deletions
|
@ -541,18 +541,24 @@
|
|||
(:shapes shape-master))
|
||||
|
||||
only-inst (fn [child-inst]
|
||||
(remove-shape child-inst
|
||||
container
|
||||
omit-touched?))
|
||||
(when-not (and omit-touched?
|
||||
(contains? (:touched shape-inst)
|
||||
:shapes-group))
|
||||
(remove-shape child-inst
|
||||
container
|
||||
omit-touched?)))
|
||||
|
||||
only-master (fn [child-master]
|
||||
(add-shape-to-instance child-master
|
||||
component
|
||||
container
|
||||
root-inst
|
||||
root-master
|
||||
omit-touched?
|
||||
set-remote-synced?))
|
||||
(when-not (and omit-touched?
|
||||
(contains? (:touched shape-inst)
|
||||
:shapes-group))
|
||||
(add-shape-to-instance child-master
|
||||
component
|
||||
container
|
||||
root-inst
|
||||
root-master
|
||||
omit-touched?
|
||||
set-remote-synced?)))
|
||||
|
||||
both (fn [child-inst child-master]
|
||||
(let [sub-root? (and (:component-id shape-inst)
|
||||
|
@ -935,7 +941,11 @@
|
|||
container
|
||||
{:type :del-obj
|
||||
:id (:id shape)
|
||||
:ignore-touched true})]
|
||||
:ignore-touched true})
|
||||
(make-change
|
||||
container
|
||||
{:type :reg-objects
|
||||
:shapes (vec parents)})]
|
||||
|
||||
add-change (fn [id]
|
||||
(let [shape' (get objects id)]
|
||||
|
|
Loading…
Add table
Reference in a new issue