diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index db3b36ac51..c856d07c71 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -70,7 +70,8 @@ void LINE_PLACER::setWorld( NODE* aWorld ) const VIA LINE_PLACER::makeVia( const VECTOR2I& aP ) { - const LAYER_RANGE layers( m_sizes.GetLayerTop(), m_sizes.GetLayerBottom() ); + const LAYER_RANGE layers( m_sizes.ViaType() == VIATYPE::THROUGH ? F_Cu : m_sizes.GetLayerTop(), + m_sizes.ViaType() == VIATYPE::THROUGH ? B_Cu : m_sizes.GetLayerBottom() ); return VIA( aP, layers, m_sizes.ViaDiameter(), m_sizes.ViaDrill(), -1, m_sizes.ViaType() ); }