From 05d21d7d075f03400661a3966fbcec190ffdd3dc Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Tue, 24 Jan 2023 15:30:20 +0100 Subject: [PATCH] :bug: Fix reorder layers with keys not refreshing layout --- frontend/src/app/main/data/workspace.cljs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index e017b6362..b1e36b369 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -609,6 +609,7 @@ objects (wsh/lookup-page-objects state page-id) selected-ids (wsh/lookup-selected state) selected-shapes (map (d/getf objects) selected-ids) + undo-id (js/Symbol) move-shape (fn [changes shape] @@ -631,7 +632,10 @@ (pcb/with-objects objects)) selected-shapes)] - (rx/of (dch/commit-changes changes)))))) + (rx/of (dwu/start-undo-transaction undo-id) + (dch/commit-changes changes) + (ptk/data-event :layout/update selected-ids) + (dwu/commit-undo-transaction undo-id)))))) ;; --- Change Shape Order (D&D Ordering)