High-contrast mode: don't render vias that don't cross high-contrast layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/8740
This commit is contained in:
parent
79ad15b4fa
commit
bbfbfc2cd2
|
@ -656,6 +656,20 @@ double PCB_VIA::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
|
||||||
if( board )
|
if( board )
|
||||||
visible = board->GetVisibleLayers() & board->GetEnabledLayers();
|
visible = board->GetVisibleLayers() & board->GetEnabledLayers();
|
||||||
|
|
||||||
|
// In high contrast mode don't show vias that don't cross the high-contrast layer
|
||||||
|
if( renderSettings->GetHighContrast() )
|
||||||
|
{
|
||||||
|
PCB_LAYER_ID highContrastLayer = renderSettings->GetPrimaryHighContrastLayer();
|
||||||
|
|
||||||
|
if( LSET::FrontTechMask().Contains( highContrastLayer ) )
|
||||||
|
highContrastLayer = F_Cu;
|
||||||
|
else if( LSET::BackTechMask().Contains( highContrastLayer ) )
|
||||||
|
highContrastLayer = B_Cu;
|
||||||
|
|
||||||
|
if( !GetLayerSet().Contains( highContrastLayer ) )
|
||||||
|
return HIDE;
|
||||||
|
}
|
||||||
|
|
||||||
if( IsViaPadLayer( aLayer ) )
|
if( IsViaPadLayer( aLayer ) )
|
||||||
{
|
{
|
||||||
if( !FlashLayer( visible ) )
|
if( !FlashLayer( visible ) )
|
||||||
|
|
Loading…
Reference in New Issue