From 5ec18aaf2a80a19c843b46b21a37914c6838fd43 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 7 Sep 2020 21:00:28 +0100 Subject: [PATCH] Fix board initialization error which left FPEdit without inner layers. --- pcbnew/footprint_edit_frame.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index 77216ab89f..0d83240ff3 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -158,15 +158,6 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent, // editor: make it non visible. GetBoard()->SetElementVisibility( LAYER_NO_CONNECTS, false ); - // Must be set after calling LoadSettings() to be sure these parameters are not dependent - // on what is read in stored settings. Enable one internal layer, because footprints - // support keepout areas that can be on internal layers only (therefore on the first internal - // layer). This is needed to handle these keepout in internal layers only. - GetBoard()->SetCopperLayerCount( 3 ); - GetBoard()->SetEnabledLayers( GetBoard()->GetEnabledLayers().set( In1_Cu ) ); - GetBoard()->SetVisibleLayers( GetBoard()->GetEnabledLayers() ); - GetBoard()->SetLayerName( In1_Cu, _( "Inner layers" ) ); - GetGalDisplayOptions().m_axesEnabled = true; // In modedit, set the default paper size to A4 for plot/print @@ -192,6 +183,15 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent, // NOTE: KifaceSettings() will return PCBNEW_SETTINGS if we started from pcbnew LoadSettings( GetSettings() ); + // Must be set after calling LoadSettings() to be sure these parameters are not dependent + // on what is read in stored settings. Enable one internal layer, because footprints + // support keepout areas that can be on internal layers only (therefore on the first internal + // layer). This is needed to handle these keepout in internal layers only. + GetBoard()->SetCopperLayerCount( 3 ); + GetBoard()->SetEnabledLayers( GetBoard()->GetEnabledLayers().set( In1_Cu ) ); + GetBoard()->SetVisibleLayers( GetBoard()->GetEnabledLayers() ); + GetBoard()->SetLayerName( In1_Cu, _( "Inner layers" ) ); + m_Layers->ReFill(); m_Layers->ReFillRender();