If color of line changed don't reset center points

This commit is contained in:
Jaex 2018-06-06 01:27:08 +03:00
parent aa1a3c3287
commit d84cf9e48d

View file

@ -36,7 +36,7 @@ public class LineDrawingShape : BaseDrawingShape
public override ShapeType ShapeType { get; } = ShapeType.DrawingLine; public override ShapeType ShapeType { get; } = ShapeType.DrawingLine;
public Point[] Points { get; private set; } public Point[] Points { get; private set; } = new Point[2];
public bool CenterNodeActive { get; private set; } public bool CenterNodeActive { get; private set; }
public int CenterPointCount { get; private set; } public int CenterPointCount { get; private set; }
@ -74,10 +74,9 @@ public override void OnConfigLoad()
int previousCenterPointCount = CenterPointCount; int previousCenterPointCount = CenterPointCount;
CenterPointCount = AnnotationOptions.LineCenterPointCount.Between(0, MaximumCenterPointCount); CenterPointCount = AnnotationOptions.LineCenterPointCount.Between(0, MaximumCenterPointCount);
AdjustPoints(CenterPointCount);
if (CenterPointCount != previousCenterPointCount) if (CenterPointCount != previousCenterPointCount)
{ {
AdjustPoints(CenterPointCount);
CenterNodeActive = false; CenterNodeActive = false;
AutoPositionCenterPoints(); AutoPositionCenterPoints();
} }