In footprint filter, check pin count mismatch first

This commit is contained in:
david-beinder 2021-05-06 00:23:34 +02:00 committed by Jeff Young
parent e709e77870
commit 49d02560e4
1 changed files with 6 additions and 6 deletions

View File

@ -62,6 +62,12 @@ void FOOTPRINT_FILTER_IT::increment()
if( filter_type == FOOTPRINT_FILTER::UNFILTERED_FP_LIST )
break;
if( filter_type & FOOTPRINT_FILTER::FILTERING_BY_PIN_COUNT )
{
if( !PinCountMatch( candidate ) )
continue;
}
if( filter_type & FOOTPRINT_FILTER::FILTERING_BY_LIBRARY )
{
if( !lib_name.IsEmpty() && !candidate.InLibrary( lib_name ) )
@ -74,12 +80,6 @@ void FOOTPRINT_FILTER_IT::increment()
continue;
}
if( filter_type & FOOTPRINT_FILTER::FILTERING_BY_PIN_COUNT )
{
if( !PinCountMatch( candidate ) )
continue;
}
if( ( filter_type & FOOTPRINT_FILTER::FILTERING_BY_TEXT_PATTERN ) )
{
wxString searchStr = wxString::Format( wxT( "%s:%s %s" ),