Make sure axesEnabled is set before saving config.

We don't actually allow the user to change this at present, so one
could argue that we should remove it from what is saved out of the
config.  But this is a smaller, safer change.

Fixes https://gitlab.com/kicad/code/kicad/issues/7666
This commit is contained in:
Jeff Young 2021-03-01 20:29:17 +00:00
parent 35e6e55bc9
commit 57e948ff08
3 changed files with 6 additions and 0 deletions

View File

@ -264,6 +264,8 @@ void SYMBOL_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
{
wxCHECK_RET( m_settings, "Call to SYMBOL_EDIT_FRAME::LoadSettings with null m_settings" );
GetGalDisplayOptions().m_axesEnabled = true;
SCH_BASE_FRAME::SaveSettings( GetSettings() );
m_settings->m_ShowPinElectricalType = GetRenderSettings()->m_ShowPinsElectricalType;

View File

@ -527,6 +527,8 @@ void FOOTPRINT_EDIT_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
void FOOTPRINT_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
{
GetGalDisplayOptions().m_axesEnabled = true;
// aCfg will be the PCBNEW_SETTINGS
FOOTPRINT_EDITOR_SETTINGS* cfg = GetSettings();

View File

@ -794,6 +794,8 @@ void FOOTPRINT_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
PCBNEW_SETTINGS* cfg = dynamic_cast<PCBNEW_SETTINGS*>( aCfg );
wxCHECK( cfg, /*void*/ );
GetGalDisplayOptions().m_axesEnabled = true;
// We don't want to store anything other than the window settings
PCB_BASE_FRAME::SaveSettings( cfg );