mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Disable resize nodes for freehand region
This commit is contained in:
parent
9d64eb6bb5
commit
b367bcb747
4 changed files with 9 additions and 7 deletions
|
@ -57,7 +57,8 @@ public enum NodeType
|
|||
None,
|
||||
Rectangle,
|
||||
Line,
|
||||
Point
|
||||
Point,
|
||||
CustomNoResize
|
||||
}
|
||||
|
||||
internal enum NodePosition
|
||||
|
|
|
@ -112,11 +112,7 @@ public virtual void OnCreated()
|
|||
|
||||
public virtual void OnUpdate()
|
||||
{
|
||||
if (Manager.IsMoving)
|
||||
{
|
||||
Manager.ResizeManager.MoveCurrentArea(InputManager.MouseVelocity.X, InputManager.MouseVelocity.Y);
|
||||
}
|
||||
else if (Manager.IsCreating && !Rectangle.IsEmpty)
|
||||
if (Manager.IsCreating && !Rectangle.IsEmpty)
|
||||
{
|
||||
Point currentPosition = InputManager.MousePosition0Based;
|
||||
|
||||
|
@ -142,6 +138,10 @@ public virtual void OnUpdate()
|
|||
|
||||
EndPosition = currentPosition;
|
||||
}
|
||||
else if (Manager.IsMoving)
|
||||
{
|
||||
Manager.ResizeManager.MoveCurrentArea(InputManager.MouseVelocity.X, InputManager.MouseVelocity.Y);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnShapePathRequested(GraphicsPath gp, Rectangle rect)
|
||||
|
|
|
@ -34,6 +34,7 @@ namespace ShareX.ScreenCaptureLib
|
|||
public class FreehandRegionShape : BaseRegionShape
|
||||
{
|
||||
public override ShapeType ShapeType { get; } = ShapeType.RegionFreehand;
|
||||
public override NodeType NodeType { get; } = NodeType.CustomNoResize;
|
||||
|
||||
private List<Point> points = new List<Point>(128);
|
||||
|
||||
|
|
|
@ -1392,7 +1392,7 @@ private void SelectShape()
|
|||
{
|
||||
BaseShape shape = CurrentShape;
|
||||
|
||||
if (shape != null && !CurrentRectangle.IsEmpty && shape.NodeType != NodeType.Point)
|
||||
if (shape != null && !CurrentRectangle.IsEmpty && shape.NodeType != NodeType.Point && shape.NodeType != NodeType.CustomNoResize)
|
||||
{
|
||||
ResizeManager.Show();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue