Add missing footprint load progress, usually in schematic editor
This commit is contained in:
parent
5bf450a89f
commit
c7eaef2d13
|
@ -23,6 +23,7 @@
|
||||||
#include <project.h>
|
#include <project.h>
|
||||||
#include <widgets/footprint_choice.h>
|
#include <widgets/footprint_choice.h>
|
||||||
#include <widgets/footprint_select_widget.h>
|
#include <widgets/footprint_select_widget.h>
|
||||||
|
#include <widgets/wx_progress_reporters.h>
|
||||||
#include <progress_reporter.h>
|
#include <progress_reporter.h>
|
||||||
#include <footprint_info_impl.h>
|
#include <footprint_info_impl.h>
|
||||||
#include <wx/wupdlock.h>
|
#include <wx/wupdlock.h>
|
||||||
|
@ -38,7 +39,8 @@ FOOTPRINT_SELECT_WIDGET::FOOTPRINT_SELECT_WIDGET( EDA_DRAW_FRAME* aFrame, wxWind
|
||||||
wxPanel( aParent ),
|
wxPanel( aParent ),
|
||||||
m_update( aUpdate ),
|
m_update( aUpdate ),
|
||||||
m_max_items( aMaxItems ),
|
m_max_items( aMaxItems ),
|
||||||
m_fp_list( aFpList )
|
m_fp_list( aFpList ),
|
||||||
|
m_frame( aFrame )
|
||||||
{
|
{
|
||||||
m_zero_filter = true;
|
m_zero_filter = true;
|
||||||
m_sizer = new wxBoxSizer( wxVERTICAL );
|
m_sizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
@ -63,8 +65,13 @@ void FOOTPRINT_SELECT_WIDGET::Load( KIWAY& aKiway, PROJECT& aProject )
|
||||||
{
|
{
|
||||||
// If the fp-info-cache is empty (or, more likely, hasn't been created in a new
|
// If the fp-info-cache is empty (or, more likely, hasn't been created in a new
|
||||||
// project yet), load footprints the hard way.
|
// project yet), load footprints the hard way.
|
||||||
FP_LIB_TABLE* fpTable = aProject.PcbFootprintLibs( aKiway );
|
FP_LIB_TABLE* fpTable = aProject.PcbFootprintLibs( aKiway );
|
||||||
static_cast<FOOTPRINT_LIST_IMPL*>( m_fp_list )->ReadFootprintFiles( fpTable );
|
WX_PROGRESS_REPORTER* progressReporter =
|
||||||
|
new WX_PROGRESS_REPORTER( m_frame, _( "Loading Footprint Libraries" ), 3 );
|
||||||
|
static_cast<FOOTPRINT_LIST_IMPL*>( m_fp_list )
|
||||||
|
->ReadFootprintFiles( fpTable, nullptr, progressReporter );
|
||||||
|
|
||||||
|
delete progressReporter;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fp_filter.SetList( *m_fp_list );
|
m_fp_filter.SetList( *m_fp_list );
|
||||||
|
|
|
@ -133,6 +133,7 @@ private:
|
||||||
FOOTPRINT_LIST* m_fp_list;
|
FOOTPRINT_LIST* m_fp_list;
|
||||||
FOOTPRINT_FILTER m_fp_filter;
|
FOOTPRINT_FILTER m_fp_filter;
|
||||||
bool m_zero_filter;
|
bool m_zero_filter;
|
||||||
|
EDA_DRAW_FRAME* m_frame;
|
||||||
|
|
||||||
void OnComboBox( wxCommandEvent& aEvent );
|
void OnComboBox( wxCommandEvent& aEvent );
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue