Fix layer preset overwriting ratsnest settings

Fixes https://gitlab.com/kicad/code/kicad/issues/6975
This commit is contained in:
Barabas Raffai 2021-01-13 01:22:30 +00:00 committed by Jon Evans
parent 3ad0e5d8bf
commit 5931a39c0f
1 changed files with 7 additions and 0 deletions

View File

@ -1133,6 +1133,13 @@ void APPEARANCE_CONTROLS::setVisibleObjects( GAL_SET aLayers )
}
else
{
// Ratsnest visibility is controlled by the ratsnest option, and not by the preset
if( m_frame->IsType( FRAME_PCB_EDITOR ) )
{
PCB_DISPLAY_OPTIONS opt = m_frame->GetDisplayOptions();
aLayers.set( LAYER_RATSNEST, opt.m_ShowGlobalRatsnest );
}
m_frame->GetBoard()->SetVisibleElements( aLayers );
}
}