From 8e6ac6c5a97c4c26276578ff8bfc6c497ad2f629 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 14 Oct 2011 18:44:15 +0200 Subject: [PATCH] CvPcb: make footprint filter case insensitive (Fix Bug #873417 ) --- cvpcb/class_footprints_listbox.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cvpcb/class_footprints_listbox.cpp b/cvpcb/class_footprints_listbox.cpp index 8854321edc..9cf915b949 100644 --- a/cvpcb/class_footprints_listbox.cpp +++ b/cvpcb/class_footprints_listbox.cpp @@ -146,10 +146,14 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredList( COMPONENT* Component, for( unsigned ii = 0; ii < list.GetCount(); ii++ ) { FOOTPRINT_INFO& footprint = list.GetItem(ii); - /* Search for matching footprints */ + // Search for matching footprints + // The search is case insensitive + wxString module = footprint.m_Module.Upper(); + wxString candidate; for( jj = 0; jj < Component->m_FootprintFilter.GetCount(); jj++ ) { - if( !footprint.m_Module.Matches( Component->m_FootprintFilter[jj] ) ) + candidate = Component->m_FootprintFilter[jj].Upper(); + if( !module.Matches( candidate ) ) continue; msg.Printf( wxT( "%3d %s" ), m_FilteredFootprintList.GetCount() + 1, footprint.m_Module.GetData() );