From 639fdb915ae6709f5e382e81a29c3621aaf470d6 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 24 Feb 2022 21:31:17 +0000 Subject: [PATCH] Implement real layer test for visibility. --- pcbnew/router/pns_kicad_iface.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index ab99fa3d0a..fab2c3db59 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -1250,10 +1250,13 @@ bool PNS_KICAD_IFACE::IsItemVisible( const PNS::ITEM* aItem ) const if( settings->GetHighContrast() ) isOnVisibleLayer = item->IsOnLayer( settings->GetPrimaryHighContrastLayer() ); - if( m_view->IsVisible( item ) && isOnVisibleLayer - && item->ViewGetLOD( item->GetLayer(), m_view ) < m_view->GetScale() ) + if( m_view->IsVisible( item ) && isOnVisibleLayer ) { - return true; + for( PCB_LAYER_ID layer : item->GetLayerSet().Seq() ) + { + if( item->ViewGetLOD( layer, m_view ) < m_view->GetScale() ) + return true; + } } // Items hidden in the router are not hidden on the board