Eeschema Eagle Import: Import pins even if Eagle even if pin to pad mapping (connects) to found. Fixes missing pins in supply symbols.

This commit is contained in:
Russell Oliver 2017-07-09 12:40:23 +10:00 committed by Maciej Suminski
parent 246e1fcd9c
commit 03739a4d37
1 changed files with 18 additions and 8 deletions

View File

@ -894,19 +894,29 @@ void SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode,
{ {
LIB_PIN* pin = loadPin( aPart, currentNode ); LIB_PIN* pin = loadPin( aPart, currentNode );
for( auto connect : aDevice->connects ) if(aDevice->connects.size() != 0)
{ {
if( connect.gate == gateName and pin->GetName().ToStdString() == connect.pin ) for( auto connect : aDevice->connects )
{ {
wxString padname( connect.pad ); if( connect.gate == gateName and pin->GetName().ToStdString() == connect.pin )
pin->SetPinNumFromString( padname ); {
pin->SetPartNumber( gateNumber ); wxString padname( connect.pad );
pin->SetUnit( gateNumber ); pin->SetPinNumFromString( padname );
pin->SetPartNumber( gateNumber );
pin->SetUnit( gateNumber );
aPart->AddDrawItem( pin ); aPart->AddDrawItem( pin );
break; break;
}
} }
} }
else
{
pin->SetPartNumber( gateNumber );
pin->SetUnit( gateNumber );
aPart->AddDrawItem( pin );
break;
}
} }
else if( nodeName == "polygon" ) else if( nodeName == "polygon" )
{ {