From 5e6ccc44fc21292fc68945c4c6b44c07d7729132 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 12 Mar 2025 10:22:04 +0100 Subject: [PATCH] :bug: Fix problem adding fill --- frontend/src/app/main/data/workspace/colors.cljs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/main/data/workspace/colors.cljs b/frontend/src/app/main/data/workspace/colors.cljs index 5b2753775..d417a111b 100644 --- a/frontend/src/app/main/data/workspace/colors.cljs +++ b/frontend/src/app/main/data/workspace/colors.cljs @@ -194,9 +194,10 @@ (watch [_ state _] (let [change-fn (fn [shape attrs] (assoc shape :fills [attrs])) undo-id (js/Symbol)] - (rx/of (dwu/start-undo-transaction undo-id)) - (transform-fill state ids color change-fn options) - (rx/of (dwu/commit-undo-transaction undo-id))))))) + (rx/concat + (rx/of (dwu/start-undo-transaction undo-id)) + (transform-fill state ids color change-fn options) + (rx/of (dwu/commit-undo-transaction undo-id)))))))) (defn add-fill ([ids color] (add-fill ids color nil)) @@ -220,9 +221,10 @@ undo-id (js/Symbol)] - (rx/of (dwu/start-undo-transaction undo-id)) - (transform-fill state ids color change-fn options) - (rx/of (dwu/commit-undo-transaction undo-id))))))) + (rx/concat + (rx/of (dwu/start-undo-transaction undo-id)) + (transform-fill state ids color change-fn options) + (rx/of (dwu/commit-undo-transaction undo-id)))))))) (defn remove-fill ([ids color position] (remove-fill ids color position nil))