mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 05:56:38 +02:00
🐛 Fix crash copy paste a Copy
This commit is contained in:
parent
9328974511
commit
76b75192e7
2 changed files with 18 additions and 2 deletions
|
@ -466,7 +466,7 @@
|
|||
(nil? obj)
|
||||
changes
|
||||
|
||||
(ctf/is-known-component? obj libraries)
|
||||
(ctf/is-main-of-known-component? obj libraries)
|
||||
(prepare-duplicate-component-change changes objects page obj parent-id frame-id delta libraries library-data it)
|
||||
|
||||
:else
|
||||
|
@ -484,6 +484,9 @@
|
|||
(ctk/instance-root? obj))
|
||||
duplicating-component? (or duplicating-component? (ctk/instance-head? obj))
|
||||
is-component-main? (ctk/main-instance? obj)
|
||||
|
||||
original-ref-shape (-> (ctf/find-original-ref-shape nil page libraries obj {:include-deleted? true})
|
||||
:id)
|
||||
into-component? (and duplicating-component?
|
||||
(ctn/in-any-component? objects parent))
|
||||
|
||||
|
@ -514,6 +517,10 @@
|
|||
(cond-> (or frame? group? bool?)
|
||||
(assoc :shapes []))
|
||||
|
||||
(cond-> (and (some? original-ref-shape)
|
||||
(not= original-ref-shape (:shape-ref obj)))
|
||||
(assoc :shape-ref original-ref-shape))
|
||||
|
||||
(gsh/move delta)
|
||||
(d/update-when :interactions #(ctsi/remap-interactions % ids-map objects))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue