diff --git a/common/dialogs/panel_color_settings.cpp b/common/dialogs/panel_color_settings.cpp index cf88fb8ed7..af28dc6944 100644 --- a/common/dialogs/panel_color_settings.cpp +++ b/common/dialogs/panel_color_settings.cpp @@ -84,8 +84,8 @@ bool PANEL_COLOR_SETTINGS::Show( bool show ) if( show ) { // In case changes have been made to the current theme in another panel: - wxString currentTheme = m_cbTheme->GetStringSelection(); - COLOR_SETTINGS* settings = Pgm().GetSettingsManager().GetColorSettings( currentTheme ); + int idx = m_cbTheme->GetSelection(); + COLOR_SETTINGS* settings = static_cast( m_cbTheme->GetClientData( idx ) ); if( settings ) *m_currentSettings = *settings; @@ -204,7 +204,7 @@ void PANEL_COLOR_SETTINGS::createThemeList( const wxString& aCurrent ) { int pos = m_cbTheme->Append( settings->GetName(), static_cast( settings ) ); - if( settings->GetName() == aCurrent ) + if( settings->GetFilename() == aCurrent ) m_cbTheme->SetSelection( pos ); m_cbTheme->GetTextExtent( settings->GetName(), &width, &height );