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

This commit is contained in:
jean-pierre charras 2011-10-14 18:44:15 +02:00
parent b7a8719617
commit 8e6ac6c5a9
1 changed files with 6 additions and 2 deletions

View File

@ -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() );