From 1c3e1df3ca43414e1f482c88a484d7c76581a7fc Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 23 Nov 2021 12:12:23 +0000 Subject: [PATCH] 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 --- pcbnew/router/router_preview_item.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/router/router_preview_item.cpp b/pcbnew/router/router_preview_item.cpp index 9af66a33f7..6ff990d293 100644 --- a/pcbnew/router/router_preview_item.cpp +++ b/pcbnew/router/router_preview_item.cpp @@ -272,7 +272,7 @@ void ROUTER_PREVIEW_ITEM::drawShape( const SHAPE* aShape, KIGFX::GAL* gal ) cons gal->SetLayerDepth( m_depth ); - if( m_hole ) + if( m_hole && dynamic_cast( m_hole ) ) { const SHAPE_CIRCLE* h = static_cast( m_hole ); int halfWidth = m_width / 2;