From 7861c815388364b21faa3d9f3f07c7847c1c713f Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 3 Jun 2020 07:57:14 +0200 Subject: [PATCH] :bug: Fixes issue with context menu --- frontend/src/uxbox/main/data/workspace.cljs | 3 ++- frontend/src/uxbox/main/ui/workspace/context_menu.cljs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/uxbox/main/data/workspace.cljs b/frontend/src/uxbox/main/data/workspace.cljs index 8de92b7344..2bfebf3316 100644 --- a/frontend/src/uxbox/main/data/workspace.cljs +++ b/frontend/src/uxbox/main/data/workspace.cljs @@ -1020,7 +1020,8 @@ ptk/UpdateEvent (update [_ state] (let [mdata {:position position - :shape shape}] + :shape shape + :selected (get-in state [:workspace-local :selected])}] (-> state (assoc-in [:workspace-local :context-menu] mdata)))) diff --git a/frontend/src/uxbox/main/ui/workspace/context_menu.cljs b/frontend/src/uxbox/main/ui/workspace/context_menu.cljs index b2f6921ab9..16445a6ba5 100644 --- a/frontend/src/uxbox/main/ui/workspace/context_menu.cljs +++ b/frontend/src/uxbox/main/ui/workspace/context_menu.cljs @@ -90,7 +90,7 @@ :shortcut "g" :on-click do-create-group}]) - (when (and (= (count selected)) (= (:type shape) :group)) + (when (and (= (count selected) 1) (= (:type shape) :group)) [:& menu-entry {:title "Ungroup" :shortcut "Shift + g" :on-click do-remove-group}])