mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-05 20:54:31 +13:00
Added ShowNodes property so shape can disable nodes
This commit is contained in:
parent
5829085cb6
commit
05490a90e5
3 changed files with 5 additions and 2 deletions
|
@ -88,6 +88,8 @@ public virtual bool IsValidShape
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual bool ShowNodes { get; } = true;
|
||||||
|
|
||||||
internal ShapeManager Manager { get; set; }
|
internal ShapeManager Manager { get; set; }
|
||||||
|
|
||||||
private Rectangle tempNodeRect;
|
private Rectangle tempNodeRect;
|
||||||
|
|
|
@ -36,6 +36,7 @@ public class StepDrawingShape : BaseDrawingShape
|
||||||
|
|
||||||
public override ShapeType ShapeType { get; } = ShapeType.DrawingStep;
|
public override ShapeType ShapeType { get; } = ShapeType.DrawingStep;
|
||||||
public override NodeType NodeType { get; } = NodeType.Point;
|
public override NodeType NodeType { get; } = NodeType.Point;
|
||||||
|
public override bool ShowNodes { get; } = false;
|
||||||
|
|
||||||
public int Number { get; set; }
|
public int Number { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -1517,7 +1517,7 @@ private void SelectShape()
|
||||||
{
|
{
|
||||||
BaseShape shape = CurrentShape;
|
BaseShape shape = CurrentShape;
|
||||||
|
|
||||||
if (shape != null && !CurrentRectangle.IsEmpty && shape.NodeType != NodeType.Point)
|
if (shape != null && shape.ShowNodes && !CurrentRectangle.IsEmpty)
|
||||||
{
|
{
|
||||||
NodesVisible = true;
|
NodesVisible = true;
|
||||||
}
|
}
|
||||||
|
@ -1586,7 +1586,7 @@ private void UpdateNodes()
|
||||||
{
|
{
|
||||||
BaseShape shape = CurrentShape;
|
BaseShape shape = CurrentShape;
|
||||||
|
|
||||||
if (shape != null && NodesVisible && Nodes != null)
|
if (shape != null && NodesVisible)
|
||||||
{
|
{
|
||||||
if (InputManager.IsMouseDown(MouseButtons.Left))
|
if (InputManager.IsMouseDown(MouseButtons.Left))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue