mirror of
https://github.com/penpot/penpot.git
synced 2026-02-13 07:02:58 +00:00
🐛 Fix flick on design tab after variant switch (#7116)
This commit is contained in:
@@ -987,16 +987,12 @@
|
||||
all-parents (-> all-parents
|
||||
(into parents-of-swapped)
|
||||
(conj (:id new-shape)))]
|
||||
|
||||
(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)))))))
|
||||
(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/select-shape (:id new-shape) false))))))
|
||||
|
||||
(defn component-multi-swap
|
||||
"Swaps several components with another one"
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
(mf/use-fn
|
||||
(mf/deps on-change)
|
||||
(fn [event]
|
||||
(dom/stop-propagation event)
|
||||
(let [node (dom/get-current-target event)
|
||||
id (dom/get-data node "id")]
|
||||
(reset! selected-id* id)
|
||||
|
||||
Reference in New Issue
Block a user