Run filled-test before degenerate-ring-test.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15642
This commit is contained in:
Jeff Young 2023-09-13 14:47:42 +01:00
parent d6b75c64e1
commit 47dc86c1e2
1 changed files with 2 additions and 6 deletions

View File

@ -667,16 +667,12 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
if( inner_radius3DU < 0 ) if( inner_radius3DU < 0 )
inner_radius3DU = 0.0; inner_radius3DU = 0.0;
if( outer_radius3DU <= inner_radius3DU ) if( aShape->IsFilled() )
{
// Don't attempt to render degenerate shapes
}
else if( aShape->IsFilled() )
{ {
aContainer->Add( new FILLED_CIRCLE_2D( center3DU, outer_radius3DU, aContainer->Add( new FILLED_CIRCLE_2D( center3DU, outer_radius3DU,
*aOwner ) ); *aOwner ) );
} }
else else if( outer_radius3DU > inner_radius3DU )
{ {
aContainer->Add( new RING_2D( center3DU, inner_radius3DU, outer_radius3DU, aContainer->Add( new RING_2D( center3DU, inner_radius3DU, outer_radius3DU,
*aOwner ) ); *aOwner ) );