PCB_BASE_FRAME::SelectFootprintFromLibTree(): fix annoying issue:
the progress reporter was displayed after loading libraries, because it was destroyed too late.
This commit is contained in:
parent
bfe2fbf991
commit
08169afbee
|
@ -204,12 +204,15 @@ MODULE* PCB_BASE_FRAME::SelectFootprintFromLibTree( LIB_ID aPreselect )
|
||||||
|
|
||||||
static wxString lastComponentName;
|
static wxString lastComponentName;
|
||||||
|
|
||||||
WX_PROGRESS_REPORTER progressReporter( this, _( "Loading Footprint Libraries" ), 3 );
|
// Load footprint files:
|
||||||
GFootprintList.ReadFootprintFiles( fpTable, nullptr, &progressReporter );
|
WX_PROGRESS_REPORTER* progressReporter = new WX_PROGRESS_REPORTER( this,
|
||||||
progressReporter.Show( false );
|
_( "Loading Footprint Libraries" ), 3 );
|
||||||
|
GFootprintList.ReadFootprintFiles( fpTable, nullptr, progressReporter );
|
||||||
|
bool cancel = progressReporter->WasCancelled();
|
||||||
|
progressReporter->Destroy();
|
||||||
|
|
||||||
if( progressReporter.WasCancelled() )
|
if( cancel )
|
||||||
return NULL;
|
return nullptr;
|
||||||
|
|
||||||
if( GFootprintList.GetErrorCount() )
|
if( GFootprintList.GetErrorCount() )
|
||||||
GFootprintList.DisplayErrors( this );
|
GFootprintList.DisplayErrors( this );
|
||||||
|
|
Loading…
Reference in New Issue