CADSTAR Schematic Archive Importer: Symbol name is case insensitive
Fixes an issue on some designs that would not be able to find the symbol definition referenced by the part due to different capitalisation of the symbol name in the part definition and the symbol definition.
This commit is contained in:
parent
914ae001b5
commit
4dc264175a
|
@ -1976,13 +1976,17 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadItemOntoKiCadSheet( LAYER_ID aCadstarSheetI
|
||||||
CADSTAR_SCH_ARCHIVE_LOADER::SYMDEF_ID CADSTAR_SCH_ARCHIVE_LOADER::getSymDefFromName(
|
CADSTAR_SCH_ARCHIVE_LOADER::SYMDEF_ID CADSTAR_SCH_ARCHIVE_LOADER::getSymDefFromName(
|
||||||
const wxString& aSymdefName, const wxString& aSymDefAlternate )
|
const wxString& aSymdefName, const wxString& aSymDefAlternate )
|
||||||
{
|
{
|
||||||
|
// Do a case-insensitive comparison
|
||||||
for( std::pair<SYMDEF_ID, SYMDEF_SCM> symPair : Library.SymbolDefinitions )
|
for( std::pair<SYMDEF_ID, SYMDEF_SCM> symPair : Library.SymbolDefinitions )
|
||||||
{
|
{
|
||||||
SYMDEF_ID id = symPair.first;
|
SYMDEF_ID id = symPair.first;
|
||||||
SYMDEF_SCM symdef = symPair.second;
|
SYMDEF_SCM symdef = symPair.second;
|
||||||
|
|
||||||
if( symdef.ReferenceName == aSymdefName && symdef.Alternate == aSymDefAlternate )
|
if( symdef.ReferenceName.Lower() == aSymdefName.Lower()
|
||||||
|
&& symdef.Alternate.Lower() == aSymDefAlternate.Lower() )
|
||||||
|
{
|
||||||
return id;
|
return id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return SYMDEF_ID();
|
return SYMDEF_ID();
|
||||||
|
|
Loading…
Reference in New Issue