Component Chooser: do not create FP list when the FP preview is disabled
This commit is contained in:
parent
52fceb3243
commit
8c63dac0c3
|
@ -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() );
|
||||
|
||||
|
|
|
@ -211,7 +211,6 @@ protected:
|
|||
bool m_external_browser_requested;
|
||||
wxString m_fp_override;
|
||||
|
||||
FOOTPRINT_LIST* m_fp_list;
|
||||
std::vector<std::pair<int, wxString>> m_field_edits;
|
||||
|
||||
// Remember the dialog size during a session
|
||||
|
|
Loading…
Reference in New Issue