From d48913093c9f8d6a995acd6743e600de8a390133 Mon Sep 17 00:00:00 2001 From: Jaex Date: Thu, 9 Jun 2016 03:33:12 +0300 Subject: [PATCH] If current shape and hover area is not valid then cancel shape --- ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs b/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs index 63ee977b9..76826bcb1 100644 --- a/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs +++ b/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs @@ -1050,7 +1050,7 @@ private void EndRegionSelection() if (shape != null) { - if (!IsCurrentRectangleValid) + if (!shape.IsValidShape) { shape.Rectangle = Rectangle.Empty; @@ -1063,6 +1063,7 @@ private void EndRegionSelection() else { DeleteCurrentShape(); + shape = null; } }