mirror of
https://github.com/penpot/penpot.git
synced 2026-07-27 16:38:13 +00:00
🐛 Fix flick on design tab after variant switch (#7116)
This commit is contained in:
parent
814ec43714
commit
2e277a39ca
@ -987,16 +987,12 @@
|
|||||||
all-parents (-> all-parents
|
all-parents (-> all-parents
|
||||||
(into parents-of-swapped)
|
(into parents-of-swapped)
|
||||||
(conj (:id new-shape)))]
|
(conj (:id new-shape)))]
|
||||||
|
(rx/of
|
||||||
(rx/merge
|
(dwu/start-undo-transaction undo-id)
|
||||||
(rx/of
|
(dch/commit-changes changes)
|
||||||
(dwu/start-undo-transaction undo-id)
|
(ptk/data-event :layout/update {:ids all-parents :undo-group undo-group})
|
||||||
(dch/commit-changes changes)
|
(dwu/commit-undo-transaction undo-id)
|
||||||
(ptk/data-event :layout/update {:ids all-parents :undo-group undo-group})
|
(dws/select-shape (:id new-shape) false))))))
|
||||||
(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
|
(defn component-multi-swap
|
||||||
"Swaps several components with another one"
|
"Swaps several components with another one"
|
||||||
|
|||||||
@ -102,6 +102,7 @@
|
|||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps on-change)
|
(mf/deps on-change)
|
||||||
(fn [event]
|
(fn [event]
|
||||||
|
(dom/stop-propagation event)
|
||||||
(let [node (dom/get-current-target event)
|
(let [node (dom/get-current-target event)
|
||||||
id (dom/get-data node "id")]
|
id (dom/get-data node "id")]
|
||||||
(reset! selected-id* id)
|
(reset! selected-id* id)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user