mirror of
https://github.com/penpot/penpot.git
synced 2025-06-04 06:01:38 +02:00
🐛 Fix copy and paste a main on another main doesn't work
This commit is contained in:
parent
899093dd55
commit
5157928cdb
2 changed files with 39 additions and 20 deletions
|
@ -1967,8 +1967,13 @@
|
|||
|
||||
page-objects (:objects page)
|
||||
|
||||
libraries (wsh/get-libraries state)
|
||||
ldata (wsh/get-local-file state)
|
||||
|
||||
full-libs (assoc-in libraries [(:id ldata) :data] ldata)
|
||||
|
||||
[parent-id
|
||||
frame-id] (ctn/find-valid-parent-and-frame-ids candidate-parent-id page-objects (vals objects))
|
||||
frame-id] (ctn/find-valid-parent-and-frame-ids candidate-parent-id page-objects (vals objects) true full-libs)
|
||||
|
||||
index (if (= candidate-parent-id parent-id)
|
||||
index
|
||||
|
@ -1978,8 +1983,7 @@
|
|||
|
||||
all-objects (merge page-objects objects)
|
||||
|
||||
libraries (wsh/get-libraries state)
|
||||
ldata (wsh/get-file state file-id)
|
||||
|
||||
|
||||
drop-cell (when (ctl/grid-layout? all-objects parent-id)
|
||||
(gslg/get-drop-cell frame-id all-objects position))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue