From ae13a46ace4bb280e443b628382d50a45f011417 Mon Sep 17 00:00:00 2001
From: Jon Evans <jon@craftyjon.com>
Date: Wed, 22 Nov 2023 13:27:50 -0500
Subject: [PATCH] Fix display of footprint parse errors at load

---
 pcbnew/footprint_edit_frame.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp
index 9651f42e2d..9e9e7e7acb 100644
--- a/pcbnew/footprint_edit_frame.cpp
+++ b/pcbnew/footprint_edit_frame.cpp
@@ -152,9 +152,6 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
     // footprint or pad mask expansions settings should be shown.
     GetBoard()->GetDesignSettings().m_SolderMaskExpansion = 0;
 
-    // restore the last footprint from the project, if any
-    restoreLastFootprint();
-
     // Ensure all layers and items are visible:
     // In footprint editor, some layers have no meaning or cannot be used, but we show all of
     // them, at least to be able to edit a bad layer
@@ -173,6 +170,9 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
     initLibraryTree();
     m_treePane = new FOOTPRINT_TREE_PANE( this );
 
+    // restore the last footprint from the project, if any, after the library has been init'ed
+    restoreLastFootprint();
+
     ReCreateMenuBar();
     ReCreateHToolbar();
     ReCreateVToolbar();