From 89488a43b93cdc014a603d9f79ba04a58932f89a Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 24 Mar 2023 11:17:37 -0700 Subject: [PATCH] Pins are case-sensitive Cleanup should remove mis-matched cases Fixes https://gitlab.com/kicad/code/kicad/issues/14415 (cherry picked from commit 09845996242c106efc047405aa1b4be33c4fcc27) --- eeschema/sch_sheet.cpp | 4 ++-- qa/unittests/eeschema/test_sch_sheet.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index 5428703aaa..2269b2bb59 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -398,7 +398,7 @@ bool SCH_SHEET::HasPin( const wxString& aName ) const { for( SCH_SHEET_PIN* pin : m_pins ) { - if( pin->GetText().CmpNoCase( aName ) == 0 ) + if( pin->GetText().Cmp( aName ) == 0 ) return true; } @@ -448,7 +448,7 @@ bool SCH_SHEET::HasUndefinedPins() const for( SCH_ITEM* aItem : m_screen->Items().OfType( SCH_HIER_LABEL_T ) ) { - if( !pin->GetText().CmpNoCase( static_cast( aItem )->GetText() ) ) + if( !pin->GetText().Cmp( static_cast( aItem )->GetText() ) ) { HLabel = static_cast( aItem ); break; diff --git a/qa/unittests/eeschema/test_sch_sheet.cpp b/qa/unittests/eeschema/test_sch_sheet.cpp index c6fed03a58..7170714d6f 100644 --- a/qa/unittests/eeschema/test_sch_sheet.cpp +++ b/qa/unittests/eeschema/test_sch_sheet.cpp @@ -123,7 +123,7 @@ BOOST_AUTO_TEST_CASE( AddPins ) // now we can find it in the list BOOST_CHECK_EQUAL( m_sheet.HasPins(), true ); BOOST_CHECK_EQUAL( m_sheet.HasPin( "pinname" ), true ); - BOOST_CHECK_EQUAL( m_sheet.HasPin( "PINname" ), true ); + BOOST_CHECK_EQUAL( m_sheet.HasPin( "PINname" ), false ); BOOST_CHECK_EQUAL( m_sheet.GetPin( pinPos ), &pinRef );