Make sure to show newly-enabled layers when changing board setup

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5478
This commit is contained in:
Jon Evans 2020-09-03 18:05:20 -04:00
parent 904d186f6d
commit 686311f0b4
1 changed files with 6 additions and 0 deletions

View File

@ -1187,6 +1187,12 @@ void PCB_EDIT_FRAME::UpdateUserInterface()
for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq ) for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq )
layerEnum.Map( *seq, GetBoard()->GetLayerName( *seq ) ); layerEnum.Map( *seq, GetBoard()->GetLayerName( *seq ) );
// Sync visibility with canvas
KIGFX::VIEW* view = GetCanvas()->GetView();
for( PCB_LAYER_ID layer : GetBoard()->GetVisibleLayers().Seq() )
view->SetLayerVisible( layer, true );
// Stackup and/or color theme may have changed // Stackup and/or color theme may have changed
m_appearancePanel->OnBoardChanged(); m_appearancePanel->OnBoardChanged();
} }