From b90f70e23078443fe8d759174d605678637b454d Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 8 May 2018 10:40:50 -0700 Subject: [PATCH] Update footprint filter type-in to be implicit * Footprint filter provides two Regex filtering options. One for keywords and one for footprint keywords. The footprint keywords (contained in the symbol files) need explicit '*' at the beginning and end of the filters to allow matching start/end. Type-in filters should search implicitly matching any wildcard substring. Fixes: lp:1769931 * https://bugs.launchpad.net/kicad/+bug/1769931 --- common/footprint_filter.cpp | 2 -- include/footprint_filter.h | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/common/footprint_filter.cpp b/common/footprint_filter.cpp index 54ca04c537..c8f70fb57c 100644 --- a/common/footprint_filter.cpp +++ b/common/footprint_filter.cpp @@ -128,8 +128,6 @@ bool FOOTPRINT_FILTER_IT::FootprintFilterMatch( FOOTPRINT_INFO& aItem ) // The matching is case insensitive wxString name; - EDA_PATTERN_MATCH_WILDCARD_EXPLICIT patternFilter; - for( auto const& each_filter : m_filter->m_footprint_filters ) { name.Empty(); diff --git a/include/footprint_filter.h b/include/footprint_filter.h index 0fcc57fb0e..5a14ca9ce1 100644 --- a/include/footprint_filter.h +++ b/include/footprint_filter.h @@ -136,11 +136,11 @@ private: FOOTPRINT_LIST* m_list; - wxString m_lib_name; - wxString m_filter_pattern; - int m_pin_count; - int m_filter_type; - EDA_PATTERN_MATCH_WILDCARD_EXPLICIT m_filter; + wxString m_lib_name; + wxString m_filter_pattern; + int m_pin_count; + int m_filter_type; + EDA_PATTERN_MATCH_WILDCARD m_filter; std::vector> m_footprint_filters; };