From 3cbb2defb318d063c0fe4c110989c61e33b1e30b Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Wed, 31 Aug 2022 11:43:54 +0200 Subject: [PATCH] :bug: Fix artboards moving with comment tool selected --- CHANGES.md | 1 + frontend/src/app/main/ui/workspace/viewport/actions.cljs | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index db6171c50..f0ac07169 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -21,6 +21,7 @@ - Fix unexpected removal of guides on copy&paste frames [Taiga #3887](https://tree.taiga.io/project/penpot/issue/3887) by @andrewzhurov - Fix props preserving on copy&paste texts [Taiga #3629](https://tree.taiga.io/project/penpot/issue/3629) by @andrewzhurov - Fix unexpected layers ungrouping on moving it [Taiga #3932](https://tree.taiga.io/project/penpot/issue/3932) by @andrewzhurov +- Fix artboards moving with comment tool selected [Taiga #3938](https://tree.taiga.io/project/penpot/issue/3938) ### :arrow_up: Deps updates ### :heart: Community contributions by (Thank you!) diff --git a/frontend/src/app/main/ui/workspace/viewport/actions.cljs b/frontend/src/app/main/ui/workspace/viewport/actions.cljs index 88ce201be..294e84c10 100644 --- a/frontend/src/app/main/ui/workspace/viewport/actions.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/actions.cljs @@ -16,6 +16,7 @@ [app.main.data.workspace.libraries :as dwl] [app.main.data.workspace.media :as dwm] [app.main.data.workspace.path :as dwdp] + [app.main.refs :as refs] [app.main.store :as st] [app.main.streams :as ms] [app.main.ui.workspace.viewport.utils :as utils] @@ -124,10 +125,11 @@ (mf/deps selected) (fn [event id] (let [shift? (kbd/shift? event) - selected? (contains? selected id)] + selected? (contains? selected id) + selected-drawtool (deref refs/selected-drawing-tool)] (st/emit! (when (or shift? (not selected?)) (dw/select-shape id shift?)) - (when (not shift?) + (when (and (nil? selected-drawtool) (not shift?)) (dw/start-move-selected))))))) (defn on-frame-enter