From 04733511fc9dffa26b3e9a1ef7ff2997e280c0ca Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Thu, 6 Mar 2025 15:12:57 -0500 Subject: [PATCH] Use case insensitive comparison in symbol footprint filter match DRC. This keeps the DRC test in line with the ERC test which is also case insensitive. (cherry picked from commit a1b78d170decaec8e17cd930d9eef9158a436b4f) --- pcbnew/drc/drc_test_provider_schematic_parity.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pcbnew/drc/drc_test_provider_schematic_parity.cpp b/pcbnew/drc/drc_test_provider_schematic_parity.cpp index 24a7e733e0..a5beb62c74 100644 --- a/pcbnew/drc/drc_test_provider_schematic_parity.cpp +++ b/pcbnew/drc/drc_test_provider_schematic_parity.cpp @@ -156,24 +156,26 @@ void DRC_TEST_PROVIDER_SCHEMATIC_PARITY::testNetlist( NETLIST& aNetlist ) if( !m_drcEngine->IsErrorLimitExceeded( DRCE_FOOTPRINT_FILTERS ) ) { - wxString libId = footprint->GetFPID().GetUniStringLibId(); - wxString fpName = footprint->GetFPID().GetUniStringLibItemName(); + wxString libIdLower = footprint->GetFPID().GetUniStringLibId().Lower(); + wxString fpNameLower = footprint->GetFPID().GetUniStringLibItemName().Lower(); size_t filtercount = component->GetFootprintFilters().GetCount(); bool found = ( 0 == filtercount ); // if no entries, do not filter for( size_t jj = 0; jj < filtercount && !found; jj++ ) { - if( component->GetFootprintFilters()[jj].Find( ':' ) == wxNOT_FOUND ) - found = fpName.Matches( component->GetFootprintFilters()[jj] ); + wxString filterLower = component->GetFootprintFilters()[jj].Lower(); + + if( filterLower.Find( ':' ) == wxNOT_FOUND ) + found = fpNameLower.Matches( filterLower ); else - found = libId.Matches( component->GetFootprintFilters()[jj] ); + found = libIdLower.Matches( filterLower ); } if( !found ) { wxString msg; msg.Printf( _( "%s doesn't match symbol's footprint filters (%s)." ), - fpName, + footprint->GetFPID().GetUniStringLibId(), wxJoin( component->GetFootprintFilters(), ' ' ) ); std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_FOOTPRINT_FILTERS );