Don't show blind/microvia holes on layers they don't appear on.

Fixes https://gitlab.com/kicad/code/kicad/issues/8144
This commit is contained in:
Jeff Young 2021-04-09 17:02:47 +01:00
parent 3a39fd5b87
commit d2c7df155b
1 changed files with 12 additions and 2 deletions

View File

@ -612,8 +612,18 @@ double VIA::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
}
else if( IsHoleLayer( aLayer ) )
{
if( !( visible & LSET::PhysicalLayersMask() ).any() )
return HIDE;
if( m_viaType == VIATYPE::BLIND_BURIED || m_viaType == VIATYPE::MICROVIA )
{
// Show a blind or micro via's hole if it crosses a visible layer
if( !( visible & GetLayerSet() ).any() )
return HIDE;
}
else
{
// Show a through via's hole if any physical layer is shown
if( !( visible & LSET::PhysicalLayersMask() ).any() )
return HIDE;
}
}
else if( IsNetnameLayer( aLayer ) )
{