GAL: Fix issue with small tracks being hidden
When drawing segments that are smaller than the segment width, OpenGL did not use realistic values, leading to hidden, small tracks. Instead, we set the track to only draw a segment when the length is at least 1 radius long (so that we can see the full semi-circle at the track end) Fixes https://gitlab.com/kicad/code/kicad/issues/5009
This commit is contained in:
parent
fdb23d1a2d
commit
294dabf640
|
@ -639,7 +639,8 @@ void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoin
|
|||
void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint,
|
||||
double aWidth )
|
||||
{
|
||||
if( aStartPoint == aEndPoint ) // 0 length segments are just a circle.
|
||||
// segments less than the radius are just a circle.
|
||||
if( ( aStartPoint - aEndPoint ).EuclideanNorm() < aWidth / 2.0 )
|
||||
{
|
||||
DrawCircle( aStartPoint, aWidth/2 );
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue