Allow import of Eagle schematics without libraries.

This commit is contained in:
Jeff Young 2021-06-16 22:02:50 +01:00
parent 4b28bac89a
commit c23c5b7f18
1 changed files with 13 additions and 11 deletions

View File

@ -559,7 +559,7 @@ void SCH_EAGLE_PLUGIN::loadSchematic( wxXmlNode* aSchematicNode )
wxXmlNode* libraryNode = getChildrenNodes( schematicChildren, "libraries" ); wxXmlNode* libraryNode = getChildrenNodes( schematicChildren, "libraries" );
wxXmlNode* sheetNode = getChildrenNodes( schematicChildren, "sheets" ); wxXmlNode* sheetNode = getChildrenNodes( schematicChildren, "sheets" );
if( !partNode || !libraryNode || !sheetNode ) if( !sheetNode )
return; return;
while( partNode ) while( partNode )
@ -571,7 +571,8 @@ void SCH_EAGLE_PLUGIN::loadSchematic( wxXmlNode* aSchematicNode )
partNode = partNode->GetNext(); partNode = partNode->GetNext();
} }
// Loop through all the libraries if( libraryNode )
{
while( libraryNode ) while( libraryNode )
{ {
// Read the library name // Read the library name
@ -586,6 +587,7 @@ void SCH_EAGLE_PLUGIN::loadSchematic( wxXmlNode* aSchematicNode )
} }
m_pi->SaveLibrary( getLibFileName().GetFullPath() ); m_pi->SaveLibrary( getLibFileName().GetFullPath() );
}
// find all nets and count how many sheets they appear on. // find all nets and count how many sheets they appear on.
// local labels will be used for nets found only on that sheet. // local labels will be used for nets found only on that sheet.