From 7d51fc7dfbea8341e6b9fc61a40ea6068773ef9b Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sat, 15 Jun 2013 12:55:51 -0400 Subject: [PATCH] Pcbnew netlist read performance improvements. * Do not search for footprint when no footprint is defined for a component in the netlist. --- pcbnew/netlist.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index bf9d60567d..5b40506808 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -185,6 +185,18 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) { component = aNetlist.GetComponent( ii ); + if( component->GetFootprintName().IsEmpty() ) + { + if( aReporter ) + { + msg.Printf( _( "No footprint defined for component `%s`.\n" ), + GetChars( component->GetReference() ) ); + aReporter->Report( msg ); + } + + continue; + } + // Check if component footprint is already on BOARD and only load the footprint from // the library if it's needed. if( aNetlist.IsFindByTimeStamp() ) @@ -278,6 +290,18 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) { component = aNetlist.GetComponent( ii ); + if( component->GetFootprintName().IsEmpty() ) + { + if( aReporter ) + { + msg.Printf( _( "No footprint defined for component `%s`.\n" ), + GetChars( component->GetReference() ) ); + aReporter->Report( msg ); + } + + continue; + } + // Check if component footprint is already on BOARD and only load the footprint from // the library if it's needed. if( aNetlist.IsFindByTimeStamp() )