diff --git a/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs b/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs index 0b7f3f115..32ef854d2 100644 --- a/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs +++ b/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs @@ -72,7 +72,6 @@ public ShapeType CurrentTool { if (currentTool == value) return; - ShapeType previousTool = currentTool; currentTool = value; if (Form.IsAnnotationMode) @@ -96,9 +95,12 @@ public ShapeType CurrentTool if (CurrentShape != null) { // do not keep selection if select tool does not handle it - if (currentTool == ShapeType.ToolSelect && !CurrentShape.IsHandledBySelectTool) + if (currentTool == ShapeType.ToolSelect) { - DeselectCurrentShape(); + if (!CurrentShape.IsHandledBySelectTool) + { + DeselectCurrentShape(); + } } // do not keep selection if we switch away from a tool and the selected shape does not match the new type else if (CurrentShape.ShapeType != currentTool)