Fix missing GetWindowSettings for LIB_EDIT_FRAME

Fixes #4389
This commit is contained in:
Jon Evans 2020-05-10 14:28:41 -04:00
parent cbe4b79107
commit df5b093fda
2 changed files with 14 additions and 0 deletions

View File

@ -239,10 +239,22 @@ void LIB_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg)
} }
WINDOW_SETTINGS* LIB_EDIT_FRAME::GetWindowSettings( APP_SETTINGS_BASE* aCfg )
{
auto cfg = Pgm().GetSettingsManager().GetAppSettings<LIBEDIT_SETTINGS>();
wxCHECK_MSG( cfg, nullptr, "Could not load libedit settings" );
return &cfg->m_Window;
}
COLOR_SETTINGS* LIB_EDIT_FRAME::GetColorSettings() COLOR_SETTINGS* LIB_EDIT_FRAME::GetColorSettings()
{ {
auto cfg = Pgm().GetSettingsManager().GetAppSettings<LIBEDIT_SETTINGS>(); auto cfg = Pgm().GetSettingsManager().GetAppSettings<LIBEDIT_SETTINGS>();
wxCHECK_MSG( cfg, nullptr, "Could not load libedit settings" );
if( cfg->m_UseEeschemaColorSettings ) if( cfg->m_UseEeschemaColorSettings )
return m_colorSettings; return m_colorSettings;
else else

View File

@ -234,6 +234,8 @@ public:
void LoadSettings( APP_SETTINGS_BASE* aCfg ) override; void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
void SaveSettings( APP_SETTINGS_BASE* aCfg ) override; void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
WINDOW_SETTINGS* GetWindowSettings( APP_SETTINGS_BASE* aCfg ) override;
LIBEDIT_SETTINGS* GetSettings() LIBEDIT_SETTINGS* GetSettings()
{ {
return m_settings; return m_settings;