mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 06:31:38 +02:00
Merge pull request #3598 from penpot/palba-fix-duplicate-component
🐛 Fix duplicate component doesn't create a main shape
This commit is contained in:
commit
2706d1ffd3
1 changed files with 3 additions and 5 deletions
|
@ -132,10 +132,8 @@
|
||||||
|
|
||||||
(let [main-instance-page (ctf/get-component-page library-data component)
|
(let [main-instance-page (ctf/get-component-page library-data component)
|
||||||
main-instance-shape (ctf/get-component-root library-data component)
|
main-instance-shape (ctf/get-component-root library-data component)
|
||||||
|
position (gpt/point (:x main-instance-shape) (:y main-instance-shape))
|
||||||
position (gpt/point (:x main-instance-shape) (:y main-instance-shape))
|
options (if components-v2 {:main-instance? true} {})
|
||||||
|
|
||||||
component-instance-extra-data (if components-v2 {:main-instance true} {})
|
|
||||||
|
|
||||||
[new-instance-shape new-instance-shapes]
|
[new-instance-shape new-instance-shapes]
|
||||||
(when (and (some? main-instance-page) (some? main-instance-shape))
|
(when (and (some? main-instance-page) (some? main-instance-shape))
|
||||||
|
@ -144,7 +142,7 @@
|
||||||
library-data
|
library-data
|
||||||
position
|
position
|
||||||
true
|
true
|
||||||
component-instance-extra-data))]
|
options))]
|
||||||
|
|
||||||
[nil nil new-instance-shape new-instance-shapes])
|
[nil nil new-instance-shape new-instance-shapes])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue