Commit 8e6ac6c5 authored by jean-pierre charras's avatar jean-pierre charras

CvPcb: make footprint filter case insensitive (Fix Bug #873417 )

parent b7a87196
...@@ -146,10 +146,14 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredList( COMPONENT* Component, ...@@ -146,10 +146,14 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredList( COMPONENT* Component,
for( unsigned ii = 0; ii < list.GetCount(); ii++ ) for( unsigned ii = 0; ii < list.GetCount(); ii++ )
{ {
FOOTPRINT_INFO& footprint = list.GetItem(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++ ) 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; continue;
msg.Printf( wxT( "%3d %s" ), m_FilteredFootprintList.GetCount() + 1, msg.Printf( wxT( "%3d %s" ), m_FilteredFootprintList.GetCount() + 1,
footprint.m_Module.GetData() ); footprint.m_Module.GetData() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment