OPENGL_GAL::DrawSegment(): Enforce nonzero width to match Cairo

Fixes: lp:1759958
* https://bugs.launchpad.net/kicad/+bug/1759958
This commit is contained in:
Jon Evans 2018-03-29 22:13:38 -04:00
parent 1ec217d70e
commit 081c77f6bd
1 changed files with 4 additions and 0 deletions

View File

@ -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