Browse Source

Fix GetRuneTypeForIntersects to work for dots

tznind 2 years ago
parent
commit
49512e3a42
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Terminal.Gui/Core/Graphs/StraightLineCanvas.cs

+ 4 - 0
Terminal.Gui/Core/Graphs/StraightLineCanvas.cs

@@ -131,6 +131,10 @@ namespace Terminal.Gui.Graphs {
 
 		private IntersectionRuneType GetRuneTypeForIntersects (IntersectionDefinition [] intersects)
 		{
+			if(intersects.All(i=>i.Line.Length == 0)) {
+				return IntersectionRuneType.Dot;
+			}
+
 			// ignore dots
 			intersects = intersects.Where (i => i.Type != IntersectionType.Dot).ToArray ();