瀏覽代碼

Fix GetRuneTypeForIntersects to work for dots

tznind 2 年之前
父節點
當前提交
49512e3a42
共有 1 個文件被更改,包括 4 次插入0 次删除
  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 ();