mirror of
https://github.com/penpot/penpot.git
synced 2025-05-13 03:06:37 +02:00
🐛 Fix frame-id when adding shapes to a main
This commit is contained in:
parent
efddd6c35f
commit
42a0152c3a
1 changed files with 6 additions and 7 deletions
|
@ -1081,7 +1081,10 @@
|
||||||
(:id component-parent-shape)
|
(:id component-parent-shape)
|
||||||
(get page :objects)
|
(get page :objects)
|
||||||
:update-new-shape update-new-shape
|
:update-new-shape update-new-shape
|
||||||
:update-original-shape update-original-shape)
|
:update-original-shape update-original-shape
|
||||||
|
:frame-id (if (cfh/frame-shape? component-parent-shape)
|
||||||
|
(:id component-parent-shape)
|
||||||
|
(:frame-id component-parent-shape)))
|
||||||
|
|
||||||
add-obj-change (fn [changes shape']
|
add-obj-change (fn [changes shape']
|
||||||
(update changes :redo-changes conj
|
(update changes :redo-changes conj
|
||||||
|
@ -1090,14 +1093,10 @@
|
||||||
{:type :add-obj
|
{:type :add-obj
|
||||||
:id (:id shape')
|
:id (:id shape')
|
||||||
:parent-id (:parent-id shape')
|
:parent-id (:parent-id shape')
|
||||||
|
:frame-id (:frame-id shape')
|
||||||
:index index
|
:index index
|
||||||
:ignore-touched true
|
:ignore-touched true
|
||||||
:obj shape'})
|
:obj shape'}))))
|
||||||
|
|
||||||
(ctn/page? component-container)
|
|
||||||
(assoc :frame-id (if (= (:type shape') :frame)
|
|
||||||
(:id shape')
|
|
||||||
(:frame-id shape'))))))
|
|
||||||
|
|
||||||
mod-obj-change (fn [changes shape']
|
mod-obj-change (fn [changes shape']
|
||||||
(update changes :redo-changes conj
|
(update changes :redo-changes conj
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue