diff --git a/common/footprint_filter.cpp b/common/footprint_filter.cpp index fa985c37e0..bc41b25837 100644 --- a/common/footprint_filter.cpp +++ b/common/footprint_filter.cpp @@ -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" ),