Use the layerSettings vector, not map. Map may not yet be valid.

Fixes https://gitlab.com/kicad/code/kicad/issues/5505
This commit is contained in:
Jeff Young 2020-09-04 22:47:19 +01:00
parent 7e3f35d3fb
commit d0d13766ae
1 changed files with 3 additions and 3 deletions

View File

@ -817,10 +817,10 @@ void APPEARANCE_CONTROLS::OnColorThemeChanged()
void APPEARANCE_CONTROLS::OnLayerChanged()
{
for( const std::pair<const PCB_LAYER_ID, APPEARANCE_SETTING*>& pair : m_layerSettingsMap )
for( const std::unique_ptr<APPEARANCE_SETTING>& setting : m_layerSettings )
{
pair.second->ctl_panel->SetBackgroundColour( m_layerPanelColour );
pair.second->ctl_indicator->SetIndicatorState( ROW_ICON_PROVIDER::STATE::OFF );
setting->ctl_panel->SetBackgroundColour( m_layerPanelColour );
setting->ctl_indicator->SetIndicatorState( ROW_ICON_PROVIDER::STATE::OFF );
}
wxChar r, g, b;