From 96037591c594e5887af50027eaaaae1ea6ab033c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 1 Oct 2023 11:21:11 +0200 Subject: [PATCH] fix FOOTPRINT::GetLikelyAttribute() to follow the comments of FOOTPRINT::CheckFootprintAttributes(): at least one through hole pad means most probably a footprint through hole attribute. --- pcbnew/footprint.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp index 498411aebb..3fbbd4e5ed 100644 --- a/pcbnew/footprint.cpp +++ b/pcbnew/footprint.cpp @@ -762,12 +762,14 @@ int FOOTPRINT::GetLikelyAttribute() const } } - if( smd_count > 0 ) - return FP_SMD; - + // Footprints with plated through-hole pads should usually be marked through hole even if they + // also have SMD because they might not be auto-placed. Exceptions to this might be shielded if( tht_count > 0 ) return FP_THROUGH_HOLE; + if( smd_count > 0 ) + return FP_SMD; + return 0; }