mirror of
https://github.com/penpot/penpot.git
synced 2025-05-16 01:16:38 +02:00
🐛 Fix problem when pasting frame and selected shape
This commit is contained in:
parent
644c796772
commit
40a38cbd38
1 changed files with 6 additions and 1 deletions
|
@ -1428,7 +1428,12 @@
|
||||||
wrapper (gsh/selection-rect selected-objs)
|
wrapper (gsh/selection-rect selected-objs)
|
||||||
orig-pos (gpt/point (:x1 wrapper) (:y1 wrapper))]
|
orig-pos (gpt/point (:x1 wrapper) (:y1 wrapper))]
|
||||||
(cond
|
(cond
|
||||||
(and (selected-frame? state) (not has-frame?))
|
has-frame?
|
||||||
|
(let [index (cph/get-position-on-parent page-objects uuid/zero)
|
||||||
|
delta (gpt/subtract mouse-pos orig-pos)]
|
||||||
|
[uuid/zero uuid/zero delta index])
|
||||||
|
|
||||||
|
(selected-frame? state)
|
||||||
(let [frame-id (first page-selected)
|
(let [frame-id (first page-selected)
|
||||||
frame-object (get page-objects frame-id)
|
frame-object (get page-objects frame-id)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue