Don't show ratsnest on layers hidden by contrast mode

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7667
This commit is contained in:
Jon Evans 2021-02-23 20:07:19 -05:00
parent aedc65f20f
commit d087ede21d
1 changed files with 11 additions and 3 deletions

View File

@ -88,9 +88,17 @@ void RATSNEST_VIEW_ITEM::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
LSET visibleLayers; LSET visibleLayers;
for( PCB_LAYER_ID layer : LSET::AllCuMask().Seq() ) // If we are in "other layers off" mode, the active layer is the only visible layer
if( aView->IsLayerVisible( layer ) ) if( rs->GetContrastModeDisplay() == HIGH_CONTRAST_MODE::HIDDEN )
visibleLayers.set( layer ); {
visibleLayers.set( rs->GetPrimaryHighContrastLayer() );
}
else
{
for( PCB_LAYER_ID layer : LSET::AllCuMask().Seq() )
if( aView->IsLayerVisible( layer ) )
visibleLayers.set( layer );
}
const bool curved_ratsnest = rs->GetCurvedRatsnestLinesEnabled(); const bool curved_ratsnest = rs->GetCurvedRatsnestLinesEnabled();