From 3d68aa4b8618bab1414c9051d1987ff0c9e11778 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Wed, 16 Dec 2020 22:07:35 -0500 Subject: [PATCH] Make sure footprint editor uses the right config object Fixes https://gitlab.com/kicad/code/kicad/-/issues/6115 --- pcbnew/footprint_edit_frame.cpp | 11 +++++++++-- pcbnew/footprint_edit_frame.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index 8fb38d0a77..6eb5cbe1da 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -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(); +} + + 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() ); } diff --git a/pcbnew/footprint_edit_frame.h b/pcbnew/footprint_edit_frame.h index 70f5a1355c..f615daff53 100644 --- a/pcbnew/footprint_edit_frame.h +++ b/pcbnew/footprint_edit_frame.h @@ -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;