mirror of
https://github.com/penpot/penpot.git
synced 2025-02-11 01:28:30 -05:00
🐛 Fix issue with paste ordering sometimes not being respected
This commit is contained in:
parent
a8103cbc3e
commit
9923268589
2 changed files with 6 additions and 6 deletions
|
@ -95,6 +95,7 @@
|
|||
- Fix guides are not duplicated with the artboard [Taiga #3072](https://tree.taiga.io/project/penpot/issue/3072)
|
||||
- Fix problem when changing group size with decimal values [Taiga #3203](https://tree.taiga.io/project/penpot/issue/3203)
|
||||
- Fix error when drawing curves with only one point [Taiga #3282](https://tree.taiga.io/project/penpot/issue/3282)
|
||||
- Fix issue with paste ordering sometimes not being respected [Taiga #3268](https://tree.taiga.io/project/penpot/issue/3268)
|
||||
|
||||
### :arrow_up: Deps updates
|
||||
### :heart: Community contributions by (Thank you!)
|
||||
|
|
|
@ -1482,12 +1482,11 @@
|
|||
(let [set-index (fn [[result index] id]
|
||||
[(assoc result id index) (inc index)])
|
||||
|
||||
map-ids (when index
|
||||
(->> (vals paste-objects)
|
||||
(filter #(not (selected (:parent-id %))))
|
||||
(map :id)
|
||||
map-ids
|
||||
(->> selected
|
||||
(map #(get-in paste-objects [% :id]))
|
||||
(reduce set-index [{} (inc index)])
|
||||
first))]
|
||||
first)]
|
||||
(if (and (= :add-obj (:type change))
|
||||
(contains? map-ids (:old-id change)))
|
||||
(assoc change :index (get map-ids (:old-id change)))
|
||||
|
|
Loading…
Add table
Reference in a new issue