Implement real layer test for visibility.

This commit is contained in:
Jeff Young 2022-02-24 21:31:17 +00:00
parent d65f9ad2d8
commit 639fdb915a
1 changed files with 6 additions and 3 deletions

View File

@ -1250,11 +1250,14 @@ 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 )
{
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
if( m_hiddenItems.find( item ) != m_hiddenItems.end() )