🐛 Fix missing selection after swap (#7104)

This commit is contained in:
Pablo Alba 2025-08-12 17:56:03 +02:00 committed by GitHub
parent 4901a80684
commit 537c5ca7b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -988,12 +988,15 @@
(into parents-of-swapped)
(conj (:id new-shape)))]
(rx/of
(dwu/start-undo-transaction undo-id)
(dch/commit-changes changes)
(dws/select-shape (:id new-shape) true)
(ptk/data-event :layout/update {:ids all-parents :undo-group undo-group})
(dwu/commit-undo-transaction undo-id))))))
(rx/merge
(rx/of
(dwu/start-undo-transaction undo-id)
(dch/commit-changes changes)
(ptk/data-event :layout/update {:ids all-parents :undo-group undo-group})
(dwu/commit-undo-transaction undo-id)
(dws/deselect-all))
(->> (rx/of (dws/select-shape (:id new-shape) false))
(rx/delay 1)))))))
(defn component-multi-swap
"Swaps several components with another one"