Ensure visible layers are synchronized properly

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5873
This commit is contained in:
Jon Evans 2020-10-04 16:55:22 -04:00
parent 8dd7777108
commit 0eaf7bfd1f
1 changed files with 4 additions and 3 deletions

View File

@ -1188,9 +1188,10 @@ void PCB_EDIT_FRAME::UpdateUserInterface()
// Sync visibility with canvas
KIGFX::VIEW* view = GetCanvas()->GetView();
LSET visible = GetBoard()->GetVisibleLayers();
for( PCB_LAYER_ID layer : GetBoard()->GetVisibleLayers().Seq() )
view->SetLayerVisible( layer, true );
for( PCB_LAYER_ID layer : LSET::AllLayersMask().Seq() )
view->SetLayerVisible( layer, visible.Contains( layer ) );
// Stackup and/or color theme may have changed
m_appearancePanel->OnBoardChanged();