mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 20:52:12 +02:00
🐛 Fix when changing order on main+flex, the copies are badly updated
This commit is contained in:
parent
76ec610d44
commit
3e965c96e7
3 changed files with 13 additions and 11 deletions
|
@ -946,16 +946,16 @@
|
|||
|
||||
changes (pcb/concat-changes library-changes file-changes)
|
||||
|
||||
find-shape (fn [data]
|
||||
(for [page-id [(:page-id data)]
|
||||
id (:shapes data)]
|
||||
extract-shapes (fn [change]
|
||||
(for [page-id [(:page-id change)]
|
||||
id (:shapes change)]
|
||||
(-> (get-in state [:workspace-data :pages-index page-id :objects id])
|
||||
(assoc :page-id page-id))))
|
||||
|
||||
updated-copies (->> changes
|
||||
:redo-changes
|
||||
(filter #(= (:type %) :reg-objects))
|
||||
(mapcat find-shape)
|
||||
(mapcat extract-shapes)
|
||||
(filter ctk/instance-head?)
|
||||
distinct)]
|
||||
|
||||
|
|
|
@ -1141,14 +1141,16 @@
|
|||
:parent-id (:parent-id shape)
|
||||
:shapes [(:id shape)]
|
||||
:index index-after
|
||||
:ignore-touched true}))
|
||||
:ignore-touched true
|
||||
:syncing true}))
|
||||
(update :undo-changes conj (make-change
|
||||
container
|
||||
{:type :mov-objects
|
||||
:parent-id (:parent-id shape)
|
||||
:shapes [(:id shape)]
|
||||
:index index-before
|
||||
:ignore-touched true})))]
|
||||
:ignore-touched true
|
||||
:syncing true})))]
|
||||
|
||||
(if (and (cfh/touched-group? parent :shapes-group) omit-touched?)
|
||||
changes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue