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

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