From ae98b54c7beea6f23171ead98cd4fee4fd0e0c17 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Sat, 2 Jan 2021 09:17:56 +1100 Subject: [PATCH] Fix drawings being erased when drawing tool not selected --- src/components/map/MapDrawing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/map/MapDrawing.js b/src/components/map/MapDrawing.js index dcccaf8..66012c3 100644 --- a/src/components/map/MapDrawing.js +++ b/src/components/map/MapDrawing.js @@ -34,7 +34,7 @@ function MapDrawing({ const [isBrushDown, setIsBrushDown] = useState(false); const [erasingShapes, setErasingShapes] = useState([]); - const shouldHover = toolSettings.type === "erase"; + const shouldHover = toolSettings.type === "erase" && active; const isBrush = toolSettings.type === "brush" || toolSettings.type === "paint"; const isShape =