Pcbnew netlist read performance improvements.

* Do not search for footprint when no footprint is defined for a component
  in the netlist.
This commit is contained in:
Wayne Stambaugh 2013-06-15 12:55:51 -04:00
parent 34a697fc37
commit 7d51fc7dfb
1 changed files with 24 additions and 0 deletions

View File

@ -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() )