From 4d6b9a7763b8bc310f937c0dcf9068cf297d3af6 Mon Sep 17 00:00:00 2001 From: Jerald-Golden-B Date: Wed, 9 Apr 2025 18:42:29 +0530 Subject: [PATCH] fix: Simplify key combination handling for 'M' key in KeyPressListener --- app/src/utils/shortcutkeys/handleShortcutKeys.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/utils/shortcutkeys/handleShortcutKeys.ts b/app/src/utils/shortcutkeys/handleShortcutKeys.ts index 73388d5..e3c484b 100644 --- a/app/src/utils/shortcutkeys/handleShortcutKeys.ts +++ b/app/src/utils/shortcutkeys/handleShortcutKeys.ts @@ -148,11 +148,10 @@ const KeyPressListener: React.FC = () => { setActiveTool("draw-floor"); setToolMode("Floor"); } - } else { - if (keyCombination === "M") { - setActiveTool("measure"); - setToolMode("MeasurementScale"); - } + } + if (keyCombination === "M") { + setActiveTool("measure"); + setToolMode("MeasurementScale"); } }