From 424e9faa8ee8fe3049e65d81bba653555fc0ffb8 Mon Sep 17 00:00:00 2001 From: Andrew Zhurov Date: Wed, 27 Jul 2022 20:44:21 +0300 Subject: [PATCH] :bug: Fix paste frame removes all guides Signed-off-by: Andrei Zhurau --- frontend/src/app/main/data/workspace/selection.cljs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/data/workspace/selection.cljs b/frontend/src/app/main/data/workspace/selection.cljs index 777a5d49c..dbc2a68ba 100644 --- a/frontend/src/app/main/data/workspace/selection.cljs +++ b/frontend/src/app/main/data/workspace/selection.cljs @@ -425,11 +425,9 @@ (assoc :position (if (= (:axis %) :x) (+ (:position %) (- (:x new-frame) (:x frame))) (+ (:position %) (- (:y new-frame) (:y frame))))))))] - - (if-not (empty? new-guides) - (conj g - (into {} (map (juxt :id identity) new-guides))) - {}))) + (cond-> g + (not-empty new-guides) + (conj (into {} (map (juxt :id identity) new-guides)))))) guides frames)] (-> (pcb/with-page changes page)