diff --git a/pcbnew/load_select_footprint.cpp b/pcbnew/load_select_footprint.cpp index 0f6fd81de8..7a6c0aeaf4 100644 --- a/pcbnew/load_select_footprint.cpp +++ b/pcbnew/load_select_footprint.cpp @@ -58,6 +58,7 @@ using namespace std::placeholders; #include #include #include +#include static void DisplayCmpDoc( wxString& aName, void* aData ); @@ -198,6 +199,18 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary, return NULL; } + // While some of the search methods can load a libraray at a time (and stop when + // a match is found), the async loader gives much better feedback and loads the + // libraries in parallel. + // If the footprints are already in the cache, ReadFootprintFiles() will return + // immediately. + WX_PROGRESS_REPORTER progressReporter( this, _( "Loading Footprint Libraries" ), 2 ); + MList.ReadFootprintFiles( aTable, libName.length() ? &libName : nullptr, &progressReporter ); + progressReporter.Show( false ); + + if( MList.GetErrorCount() ) + MList.DisplayErrors( this ); + if( dlg.IsKeyword() ) // Selection by keywords { allowWildSeach = false;