From 4dc264175a42da8d8d1049a338e78f3a1b0d0480 Mon Sep 17 00:00:00 2001 From: Roberto Fernandez Bautista Date: Tue, 2 Feb 2021 15:38:46 +0000 Subject: [PATCH] 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. --- eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp index 2e0a865661..640c862a54 100644 --- a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp +++ b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp @@ -1976,13 +1976,17 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadItemOntoKiCadSheet( LAYER_ID aCadstarSheetI CADSTAR_SCH_ARCHIVE_LOADER::SYMDEF_ID CADSTAR_SCH_ARCHIVE_LOADER::getSymDefFromName( const wxString& aSymdefName, const wxString& aSymDefAlternate ) { + // Do a case-insensitive comparison for( std::pair symPair : Library.SymbolDefinitions ) { SYMDEF_ID id = symPair.first; 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 SYMDEF_ID();