diff --git a/eeschema/dialogs/dialog_choose_component.cpp b/eeschema/dialogs/dialog_choose_component.cpp index 18711101ae..128331f416 100644 --- a/eeschema/dialogs/dialog_choose_component.cpp +++ b/eeschema/dialogs/dialog_choose_component.cpp @@ -65,8 +65,6 @@ DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT( SCH_BASE_FRAME* aParent, const m_load_footprints( aShowFootprints ), m_external_browser_requested( false ) { - m_fp_list = FOOTPRINT_LIST::GetInstance( Kiway() ); - auto sizer = new wxBoxSizer( wxVERTICAL ); // Use a slightly different layout, with a details pane spanning the entire window, @@ -161,8 +159,10 @@ wxPanel* DIALOG_CHOOSE_COMPONENT::ConstructRightPanel( wxWindow* aParent ) if( m_show_footprints ) { + FOOTPRINT_LIST* fp_list = FOOTPRINT_LIST::GetInstance( Kiway() ); + if( m_allow_field_edits ) - m_fp_sel_ctrl = new FOOTPRINT_SELECT_WIDGET( panel, m_fp_list, true ); + m_fp_sel_ctrl = new FOOTPRINT_SELECT_WIDGET( panel, fp_list, true ); m_fp_view_ctrl = new FOOTPRINT_PREVIEW_WIDGET( panel, Kiway() ); diff --git a/eeschema/dialogs/dialog_choose_component.h b/eeschema/dialogs/dialog_choose_component.h index 17581fb17c..0e09bbc2d4 100644 --- a/eeschema/dialogs/dialog_choose_component.h +++ b/eeschema/dialogs/dialog_choose_component.h @@ -211,7 +211,6 @@ protected: bool m_external_browser_requested; wxString m_fp_override; - FOOTPRINT_LIST* m_fp_list; std::vector> m_field_edits; // Remember the dialog size during a session