mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 23:51:37 +02:00
Maintain correct order on group duplication
This commit is contained in:
parent
a3fdb22342
commit
6a38675602
1 changed files with 1 additions and 0 deletions
|
@ -47,6 +47,7 @@
|
||||||
(update-in $ [:shapes group :items] #(into [] (cons id %)))
|
(update-in $ [:shapes group :items] #(into [] (cons id %)))
|
||||||
(assoc-in $ [:shapes id] shape)))]
|
(assoc-in $ [:shapes id] shape)))]
|
||||||
(->> (map #(get-in state [:shapes %]) items)
|
(->> (map #(get-in state [:shapes %]) items)
|
||||||
|
(reverse)
|
||||||
(reduce #(duplicate-shape %1 %2 used-names page id) state)))
|
(reduce #(duplicate-shape %1 %2 used-names page id) state)))
|
||||||
(let [id (uuid/random)
|
(let [id (uuid/random)
|
||||||
shape (-> (dissoc shape :group)
|
shape (-> (dissoc shape :group)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue