Don't try to load a nonexistent layer setting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6998
This commit is contained in:
parent
1e4d81e3c4
commit
5c22ffe422
|
@ -1060,6 +1060,13 @@ void APPEARANCE_CONTROLS::OnLayerChanged()
|
|||
}
|
||||
|
||||
PCB_LAYER_ID current = m_frame->GetActiveLayer();
|
||||
|
||||
if( !m_layerSettingsMap.count( current ) )
|
||||
{
|
||||
wxASSERT( m_layerSettingsMap.count( F_Cu ) );
|
||||
current = F_Cu;
|
||||
}
|
||||
|
||||
APPEARANCE_SETTING* newSetting = m_layerSettingsMap[ current ];
|
||||
|
||||
newSetting->ctl_panel->SetBackgroundColour( wxColour( r, g, b ) );
|
||||
|
@ -1334,6 +1341,7 @@ void APPEARANCE_CONTROLS::rebuildLayers()
|
|||
#endif
|
||||
|
||||
m_layerSettings.clear();
|
||||
m_layerSettingsMap.clear();
|
||||
m_layersOuterSizer->Clear( true );
|
||||
|
||||
auto appendLayer =
|
||||
|
|
Loading…
Reference in New Issue