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,6 +894,8 @@ void SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode,
{ {
LIB_PIN* pin = loadPin( aPart, currentNode ); LIB_PIN* pin = loadPin( aPart, currentNode );
if(aDevice->connects.size() != 0)
{
for( auto connect : aDevice->connects ) for( auto connect : aDevice->connects )
{ {
if( connect.gate == gateName and pin->GetName().ToStdString() == connect.pin ) if( connect.gate == gateName and pin->GetName().ToStdString() == connect.pin )
@ -908,6 +910,14 @@ void SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode,
} }
} }
} }
else
{
pin->SetPartNumber( gateNumber );
pin->SetUnit( gateNumber );
aPart->AddDrawItem( pin );
break;
}
}
else if( nodeName == "polygon" ) else if( nodeName == "polygon" )
{ {
// loadPolygon( aPart, currentNode ); // loadPolygon( aPart, currentNode );