From 33d85081eb75881d2b13df09b06486b4c6fda05a Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 10 Feb 2018 15:04:54 +0000 Subject: [PATCH 5/5] Use async footprint loader for Place Footprint. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.14.3 (Apple Git-98)" This is a multi-part message in MIME format. --------------2.14.3 (Apple Git-98) Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit Fixes: lp:1674053 * https://bugs.launchpad.net/kicad/+bug/1674053 --- pcbnew/load_select_footprint.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) --------------2.14.3 (Apple Git-98) Content-Type: text/x-patch; name="0005-Use-async-footprint-loader-for-Place-Footprint.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0005-Use-async-footprint-loader-for-Place-Footprint.patch" diff --git a/pcbnew/load_select_footprint.cpp b/pcbnew/load_select_footprint.cpp index 0f6fd81de..2a1ac4568 100644 --- a/pcbnew/load_select_footprint.cpp +++ b/pcbnew/load_select_footprint.cpp @@ -198,6 +198,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; --------------2.14.3 (Apple Git-98)--