Make sure footprint editor uses the right config object

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6115
This commit is contained in:
Jon Evans 2020-12-16 22:07:35 -05:00
parent 87b25936a0
commit 3d68aa4b86
2 changed files with 11 additions and 2 deletions

View File

@ -499,6 +499,13 @@ FOOTPRINT_EDITOR_SETTINGS* FOOTPRINT_EDIT_FRAME::GetSettings()
}
APP_SETTINGS_BASE* FOOTPRINT_EDIT_FRAME::config() const
{
return m_settings ? m_settings
: Pgm().GetSettingsManager().GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
}
void FOOTPRINT_EDIT_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
{
// aCfg will be the PCBNEW_SETTINGS
@ -627,9 +634,9 @@ void FOOTPRINT_EDIT_FRAME::doCloseWindow()
m_auimgr.GetPane( "LayersManager" ).Show( false );
m_auimgr.GetPane( "SelectionFilter" ).Show( false );
Pgm().GetSettingsManager().FlushAndRelease( GetSettings() );
Clear_Pcb( false );
Pgm().GetSettingsManager().FlushAndRelease( GetSettings() );
}

View File

@ -74,6 +74,8 @@ public:
FOOTPRINT_EDITOR_SETTINGS* GetSettings();
APP_SETTINGS_BASE* config() const override;
BOARD_DESIGN_SETTINGS& GetDesignSettings() const override;
const PCB_PLOT_PARAMS& GetPlotSettings() const override;