From 0922c73bd19aed75b37a7a4db3c395327c570ca9 Mon Sep 17 00:00:00 2001 From: Jaex Date: Sat, 17 Sep 2022 10:30:59 +0300 Subject: [PATCH] fixed #6512: When Ctrl key is hold also disable selection of resize nodes --- ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs b/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs index 7b7f84058..ac45e4eed 100644 --- a/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs +++ b/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs @@ -1048,7 +1048,7 @@ internal void UpdateObjects(ImageEditorControl[] objects, PointF mousePosition) { ImageEditorControl obj = objects[i]; - if (obj.Visible) + if (!IsCtrlModifier && obj.Visible) { obj.IsCursorHover = obj.Rectangle.Contains(mousePosition); @@ -1098,11 +1098,14 @@ internal void UpdateObjects() internal void DrawObjects(Graphics g) { - foreach (ImageEditorControl obj in DrawableObjects) + if (!IsCtrlModifier) { - if (obj.Visible) + foreach (ImageEditorControl obj in DrawableObjects) { - obj.OnDraw(g); + if (obj.Visible) + { + obj.OnDraw(g); + } } } }