Fix a few issues with color theme editing

This commit is contained in:
Jon Evans 2020-10-06 19:21:20 -04:00
parent c3da54b741
commit 9bae2cadf0
1 changed files with 3 additions and 3 deletions

View File

@ -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<COLOR_SETTINGS*>( 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<void*>( settings ) );
if( settings->GetName() == aCurrent )
if( settings->GetFilename() == aCurrent )
m_cbTheme->SetSelection( pos );
m_cbTheme->GetTextExtent( settings->GetName(), &width, &height );