From c360bbba20d3f58220fe49358ecd63ecb99eb675 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 12 Dec 2021 09:02:15 +0100 Subject: [PATCH] Browse footprint libraries now remember window-size and position (resolveCanvasType() saves the settings, so it must come after they are loaded) Fixes #9935 https://gitlab.com/kicad/code/kicad/issues/9935 --- pcbnew/footprint_viewer_frame.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/footprint_viewer_frame.cpp b/pcbnew/footprint_viewer_frame.cpp index ddd064350c..2ae112a876 100644 --- a/pcbnew/footprint_viewer_frame.cpp +++ b/pcbnew/footprint_viewer_frame.cpp @@ -184,8 +184,6 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent GetGalDisplayOptions(), m_canvasType ); SetCanvas( drawPanel ); - resolveCanvasType(); - SetBoard( new BOARD() ); // This board will only be used to hold a footprint for viewing @@ -208,6 +206,9 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent LoadSettings( config() ); GetGalDisplayOptions().m_axesEnabled = true; + // Call resolveCanvasType after loading settings: + resolveCanvasType(); + // Create the manager and dispatcher & route draw panel events to the dispatcher m_toolManager = new TOOL_MANAGER; m_toolManager->SetEnvironment( GetBoard(), drawPanel->GetView(),