mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
🐛 Fix problem with paste objects
This commit is contained in:
parent
9b8ef35603
commit
4b8783c104
1 changed files with 8 additions and 4 deletions
|
@ -1822,10 +1822,7 @@
|
||||||
(when (ctl/grid-layout? all-objects parent-id)
|
(when (ctl/grid-layout? all-objects parent-id)
|
||||||
(gslg/get-drop-cell frame-id all-objects mouse-pos))
|
(gslg/get-drop-cell frame-id all-objects mouse-pos))
|
||||||
|
|
||||||
changes
|
changes (pcb/resize-parents changes new-objects-ids)
|
||||||
(-> (pcb/resize-parents changes new-objects-ids)
|
|
||||||
(cond-> (some? drop-cell)
|
|
||||||
(pcb/update-shapes [parent-id] #(ctl/add-children-to-cell % (into (d/ordered-set) new-objects-ids) all-objects drop-cell))))
|
|
||||||
|
|
||||||
selected (->> changes
|
selected (->> changes
|
||||||
:redo-changes
|
:redo-changes
|
||||||
|
@ -1833,6 +1830,13 @@
|
||||||
(filter #(selected (:old-id %)))
|
(filter #(selected (:old-id %)))
|
||||||
(map #(get-in % [:obj :id]))
|
(map #(get-in % [:obj :id]))
|
||||||
(into (d/ordered-set)))
|
(into (d/ordered-set)))
|
||||||
|
|
||||||
|
changes
|
||||||
|
(cond-> changes
|
||||||
|
(some? drop-cell)
|
||||||
|
(pcb/update-shapes [parent-id]
|
||||||
|
#(ctl/add-children-to-cell % selected all-objects drop-cell)))
|
||||||
|
|
||||||
undo-id (js/Symbol)]
|
undo-id (js/Symbol)]
|
||||||
|
|
||||||
(rx/of (dwu/start-undo-transaction undo-id)
|
(rx/of (dwu/start-undo-transaction undo-id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue