mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-04 04:06:05 +13:00
When shift pressed create new point once to move for polygon mode
This commit is contained in:
parent
1315f47340
commit
3b2d2d3045
1 changed files with 9 additions and 1 deletions
|
@ -37,6 +37,7 @@ public class FreehandRegionShape : BaseRegionShape
|
|||
public override NodeType NodeType { get; } = NodeType.CustomNoResize;
|
||||
|
||||
private List<Point> points = new List<Point>();
|
||||
private bool isPolygonMode;
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
|
@ -50,9 +51,16 @@ public override void OnUpdate()
|
|||
}
|
||||
else if (Manager.IsProportionalResizing)
|
||||
{
|
||||
points[points.Count - 1] = InputManager.MousePosition0Based;
|
||||
if (!isPolygonMode)
|
||||
{
|
||||
points.Add(pos);
|
||||
}
|
||||
|
||||
points[points.Count - 1] = pos;
|
||||
}
|
||||
|
||||
isPolygonMode = Manager.IsProportionalResizing;
|
||||
|
||||
Rectangle = points.CreateRectangle();
|
||||
}
|
||||
else if (Manager.IsMoving)
|
||||
|
|
Loading…
Reference in a new issue