From 7f03666f96e4fba8298a0aa014cf962a27fde743 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 17 May 2024 17:57:42 +0000 Subject: [PATCH] Support LIB_ID queries in searchFootprints too Fixes https://gitlab.com/kicad/code/kicad/-/issues/18039 (cherry picked from commit fee0028ee978dc68d007307e0c58b41b77ac234b) Co-authored-by: Jon Evans --- pcbnew/pcbexpr_functions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcbnew/pcbexpr_functions.cpp b/pcbnew/pcbexpr_functions.cpp index ebbac4fb77..6b8f3819cb 100644 --- a/pcbnew/pcbexpr_functions.cpp +++ b/pcbnew/pcbexpr_functions.cpp @@ -234,6 +234,12 @@ static bool searchFootprints( BOARD* aBoard, const wxString& aArg, PCBEXPR_CONTE if( aFunc( fp ) ) return true; } + else if( aArg.Contains( ':' ) + && fp->GetFPIDAsString().Matches( aArg ) ) + { + if( aFunc( fp ) ) + return true; + } } return false;