From 49512e3a425d2c9ff6db3a00da285fb2d98c06b7 Mon Sep 17 00:00:00 2001 From: tznind Date: Sat, 7 Jan 2023 07:45:07 +0000 Subject: [PATCH] Fix GetRuneTypeForIntersects to work for dots --- Terminal.Gui/Core/Graphs/StraightLineCanvas.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Terminal.Gui/Core/Graphs/StraightLineCanvas.cs b/Terminal.Gui/Core/Graphs/StraightLineCanvas.cs index 04ec154ec..42fccbbf2 100644 --- a/Terminal.Gui/Core/Graphs/StraightLineCanvas.cs +++ b/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 ();