CADSTAR Schematic Archive Importer: Handle undefined pin number in part
Use terminal pin number (i.e. from the symbol definition) when the pin number is undefined in the part. This fixes a bug that resulted in symbols with "0" as the pin numbers.
This commit is contained in:
parent
cc27c31ab0
commit
f530b12c31
|
@ -970,7 +970,7 @@ public:
|
||||||
BOTTOM_RIGHT = 3
|
BOTTOM_RIGHT = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
PART_DEFINITION_PIN_ID ID;
|
PART_DEFINITION_PIN_ID ID = UNDEFINED_VALUE;
|
||||||
|
|
||||||
wxString Identifier = wxEmptyString; ///< This should match a pad identifier
|
wxString Identifier = wxEmptyString; ///< This should match a pad identifier
|
||||||
///< in the component footprint
|
///< in the component footprint
|
||||||
|
|
|
@ -1095,6 +1095,8 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary( const SYMDEF_ID& aSymdef
|
||||||
{
|
{
|
||||||
if( !csPin.Identifier.IsEmpty() )
|
if( !csPin.Identifier.IsEmpty() )
|
||||||
pinNum = csPin.Identifier;
|
pinNum = csPin.Identifier;
|
||||||
|
else if( csPin.ID == UNDEFINED_VALUE )
|
||||||
|
pinNum = wxString::Format( "%ld", term.ID );
|
||||||
else
|
else
|
||||||
pinNum = wxString::Format( "%ld", csPin.ID );
|
pinNum = wxString::Format( "%ld", csPin.ID );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue