/// <summary> /// Removes a Control Point from this connection /// </summary> /// <param name="controlPoint">the Control Point to remove</param> /// <param name="destroySelfIfEmpty">whether the connection should be destroyed when empty afterwards</param> public void RemoveControlPoint(CurvySplineSegment controlPoint, bool destroySelfIfEmpty = true) { controlPoint.Connection = null; ControlPoints.Remove(controlPoint); if (ControlPoints.Count == 0 && destroySelfIfEmpty) { Delete(); } }
public void RemoveControlPoint(ControlPoint controlPoint) { ControlPoints.Remove(controlPoint); var number = 1; foreach (var item in ControlPoints) { item.Number = number; number++; } CalculateCurve(); }