From 081c77f6bdb55c277bea2603a99dda5eabecd914 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Thu, 29 Mar 2018 22:13:38 -0400 Subject: [PATCH] OPENGL_GAL::DrawSegment(): Enforce nonzero width to match Cairo Fixes: lp:1759958 * https://bugs.launchpad.net/kicad/+bug/1759958 --- common/gal/opengl/opengl_gal.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index e15d371d3d..0c99858d00 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -422,6 +422,10 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP VECTOR2D startEndVector = aEndPoint - aStartPoint; double lineAngle = startEndVector.Angle(); + // Width must be nonzero for anything to appear + if( aWidth <= 0 ) + aWidth = 1.0; + if( isFillEnabled ) { // Filled tracks