Not all holes are round.

We currently only need this to work for vias as we're a long way
from being able to support it for pads, so just check the hole
shape.

Fixes https://gitlab.com/kicad/code/kicad/issues/9735
This commit is contained in:
Jeff Young 2021-11-23 12:12:23 +00:00
parent e56e61ffb5
commit 1c3e1df3ca
1 changed files with 1 additions and 1 deletions

View File

@ -272,7 +272,7 @@ void ROUTER_PREVIEW_ITEM::drawShape( const SHAPE* aShape, KIGFX::GAL* gal ) cons
gal->SetLayerDepth( m_depth ); gal->SetLayerDepth( m_depth );
if( m_hole ) if( m_hole && dynamic_cast<SHAPE_CIRCLE*>( m_hole ) )
{ {
const SHAPE_CIRCLE* h = static_cast<const SHAPE_CIRCLE*>( m_hole ); const SHAPE_CIRCLE* h = static_cast<const SHAPE_CIRCLE*>( m_hole );
int halfWidth = m_width / 2; int halfWidth = m_width / 2;