Need to check enabled as well as visible.

Fixes https://gitlab.com/kicad/code/kicad/issues/12786
This commit is contained in:
Jeff Young 2022-11-06 19:53:33 +00:00
parent 396e220133
commit be29ab2c76
1 changed files with 1 additions and 4 deletions

View File

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