Dim hole walls that don't pass through high-contrast layers.

Fixes https://gitlab.com/kicad/code/kicad/issues/8144
This commit is contained in:
Jeff Young 2021-04-10 22:37:56 +01:00
parent 5c448057c8
commit 675444a646
1 changed files with 18 additions and 0 deletions

View File

@ -347,6 +347,24 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons
if( !static_cast<const VIA*>( item )->FlashLayer( primary ) )
isActive = false;
}
else if( IsHoleLayer( originalLayer ) )
{
const VIA* via = static_cast<const VIA*>( item );
VIATYPE viaType = via ? via->GetViaType() : VIATYPE::NOT_DEFINED;
if( via && ( viaType == VIATYPE::BLIND_BURIED || viaType == VIATYPE::MICROVIA ) )
{
// A blind or micro via's hole is active if it crosses the primary layer
if( via->GetLayerSet().test( primary ) == 0 )
isActive = false;
}
else
{
// A through via or pad's hole is active if any physical layer is active
if( LSET::PhysicalLayersMask().test( primary ) == 0 )
isActive = false;
}
}
if( !isActive )
{