diff --git a/pcbnew/widgets/appearance_controls.cpp b/pcbnew/widgets/appearance_controls.cpp index 1b782795e6..4e07c2e99b 100644 --- a/pcbnew/widgets/appearance_controls.cpp +++ b/pcbnew/widgets/appearance_controls.cpp @@ -817,10 +817,10 @@ void APPEARANCE_CONTROLS::OnColorThemeChanged() void APPEARANCE_CONTROLS::OnLayerChanged() { - for( const std::pair& pair : m_layerSettingsMap ) + for( const std::unique_ptr& 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;