Commit da51dbe1 authored by jean-pierre charras's avatar jean-pierre charras

Cvpcb fix bug #1183796 and fix bug when a fp lib is not found : the name of...

Cvpcb fix bug  #1183796 and fix bug when a fp lib is not found : the name of the missing file was not displayed in message window.
parent 29613e29
......@@ -77,7 +77,7 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( wxArrayString& aFootprintsLibNames )
if( !filename.FileExists() )
{
m_filesNotFound << filename.GetFullName() << wxT( "\n" );
m_filesNotFound << aFootprintsLibNames[ii] << wxT( "\n" );
continue;
}
......
......@@ -428,16 +428,11 @@ void CMP_READER::Load( NETLIST* aNetlist ) throw( IO_ERROR, PARSE_ERROR )
// Find the corresponding item in component list:
COMPONENT* component = aNetlist->GetComponentByReference( reference );
// This cannot happen with a valid file.
if( component == NULL )
{
wxString msg;
msg.Printf( _( "Cannot find component \'%s\' in footprint assignment file." ),
GetChars( reference ) );
THROW_PARSE_ERROR( msg, m_lineReader->GetSource(), m_lineReader->Line(),
m_lineReader->LineNumber(), m_lineReader->Length() );
}
component->SetFootprintName( footprint );
// the corresponding component could be no more existing in netlist:
// this is the case when it is just removed from schematic,
// and still exists in footprint assignment list, before this list is updated
// This is an usual case during the life of a design
if( component )
component->SetFootprintName( footprint );
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment