resolveCanvasType saves the settings, so it must come after they are loaded

Fixes https://gitlab.com/kicad/code/kicad/issues/9799
This commit is contained in:
Ian McInerney 2021-12-03 00:33:13 +00:00
parent 4757f52a2e
commit 65c0e0cd18
1 changed files with 2 additions and 2 deletions

View File

@ -185,8 +185,6 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_selectionFilterPanel = new PANEL_SELECTION_FILTER( this ); m_selectionFilterPanel = new PANEL_SELECTION_FILTER( this );
m_appearancePanel = new APPEARANCE_CONTROLS( this, GetCanvas(), true ); m_appearancePanel = new APPEARANCE_CONTROLS( this, GetCanvas(), true );
resolveCanvasType();
// LoadSettings() *after* creating m_LayersManager, because LoadSettings() initialize // LoadSettings() *after* creating m_LayersManager, because LoadSettings() initialize
// parameters in m_LayersManager // parameters in m_LayersManager
// NOTE: KifaceSettings() will return PCBNEW_SETTINGS if we started from pcbnew // NOTE: KifaceSettings() will return PCBNEW_SETTINGS if we started from pcbnew
@ -291,6 +289,8 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
UpdateTitle(); UpdateTitle();
setupUnits( GetSettings() ); setupUnits( GetSettings() );
resolveCanvasType();
// Default shutdown reason until a file is loaded // Default shutdown reason until a file is loaded
KIPLATFORM::APP::SetShutdownBlockReason( this, _( "Footprint changes are unsaved" ) ); KIPLATFORM::APP::SetShutdownBlockReason( this, _( "Footprint changes are unsaved" ) );