mirror of
https://github.com/penpot/penpot.git
synced 2025-03-10 06:41:40 -05:00
🐛 swap slot is not copied on copy-paste of a main
This commit is contained in:
parent
c6fabc349e
commit
2a752e3625
1 changed files with 5 additions and 1 deletions
|
@ -386,7 +386,8 @@
|
|||
(fn [new-shape original-shape]
|
||||
(let [new-name (:name new-shape)
|
||||
root? (or (ctk/instance-root? original-shape) ; If shape is inside a component (not components-v2)
|
||||
(nil? (:parent-id original-shape)))] ; we detect it by having no parent)
|
||||
(nil? (:parent-id original-shape))) ; we detect it by having no parent)
|
||||
swap-slot (ctk/get-swap-slot original-shape)]
|
||||
|
||||
(when root?
|
||||
(vswap! unames conj new-name))
|
||||
|
@ -398,6 +399,9 @@
|
|||
(-> (gsh/move delta)
|
||||
(dissoc :touched))
|
||||
|
||||
(some? swap-slot)
|
||||
(assoc :touched #{(ctk/build-swap-slot-group swap-slot)})
|
||||
|
||||
(and main-instance? root?)
|
||||
(assoc :main-instance true)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue