diff --git a/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs b/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs index eb9cca9ca..ebab1d376 100644 --- a/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs +++ b/ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs @@ -559,13 +559,13 @@ private void form_KeyDown(object sender, KeyEventArgs e) { if (e.Control) { + shape.OnMoving(); shape.Move(x, y); - shape.OnMoved(); } else { + shape.OnResizing(); shape.Resize(x, y, !e.Alt); - shape.OnResized(); } } } @@ -587,22 +587,39 @@ private void form_KeyUp(object sender, KeyEventArgs e) case Keys.Left: case Keys.A: isLeftPressed = false; + ShapeMoved(); break; case Keys.Right: case Keys.D: isRightPressed = false; + ShapeMoved(); break; case Keys.Up: case Keys.W: isUpPressed = false; + ShapeMoved(); break; case Keys.Down: case Keys.S: isDownPressed = false; + ShapeMoved(); break; } } + private void ShapeMoved() + { + if (!IsCreating) + { + BaseShape shape = CurrentShape; + + if (shape != null) + { + shape.OnMoved(); + } + } + } + private void RunAction(RegionCaptureAction action) { switch (action)