Fix a few issues with builtin color themes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6754
This commit is contained in:
parent
71b446f43c
commit
81ce1a07ee
|
@ -368,6 +368,7 @@ std::vector<COLOR_SETTINGS*> COLOR_SETTINGS::CreateBuiltinColorSettings()
|
|||
COLOR_SETTINGS* classicTheme = new COLOR_SETTINGS( wxT( "_builtin_classic" ) );
|
||||
classicTheme->SetName( _( "KiCad Classic" ) );
|
||||
classicTheme->m_writeFile = false;
|
||||
classicTheme->m_params.clear(); // Disable load/store
|
||||
|
||||
for( const std::pair<int, COLOR4D> entry : s_classicTheme )
|
||||
classicTheme->m_colors[entry.first] = entry.second;
|
||||
|
|
|
@ -66,6 +66,10 @@ PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS( SCH_BASE_FRAME* aF
|
|||
EESCHEMA_SETTINGS* app_settings = mgr.GetAppSettings<EESCHEMA_SETTINGS>();
|
||||
COLOR_SETTINGS* current = mgr.GetColorSettings( app_settings->m_ColorTheme );
|
||||
|
||||
// Saved theme doesn't exist? Reset to default
|
||||
if( current->GetFilename() != app_settings->m_ColorTheme )
|
||||
app_settings->m_ColorTheme = current->GetFilename();
|
||||
|
||||
createThemeList( app_settings->m_ColorTheme );
|
||||
|
||||
m_optOverrideColors->SetValue( current->GetOverrideSchItemColors() );
|
||||
|
|
|
@ -382,6 +382,10 @@ PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS( PCB_EDIT_FRAME* aFrame
|
|||
PCBNEW_SETTINGS* app_settings = mgr.GetAppSettings<PCBNEW_SETTINGS>();
|
||||
COLOR_SETTINGS* current = mgr.GetColorSettings( app_settings->m_ColorTheme );
|
||||
|
||||
// Saved theme doesn't exist? Reset to default
|
||||
if( current->GetFilename() != app_settings->m_ColorTheme )
|
||||
app_settings->m_ColorTheme = current->GetFilename();
|
||||
|
||||
createThemeList( app_settings->m_ColorTheme );
|
||||
|
||||
// Currently this only applies to eeschema
|
||||
|
|
Loading…
Reference in New Issue