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
(cherry picked from commit 294dabf640
)
This commit is contained in:
parent
bce8fb31ab
commit
5bdc78e3ba
|
@ -613,7 +613,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