fix FOOTPRINT::GetLikelyAttribute() to follow the comments of FOOTPRINT::CheckFootprintAttributes(): at least one through hole pad means most probably a footprint through hole attribute.

This commit is contained in:
jean-pierre charras 2023-10-01 11:21:11 +02:00
parent 692949fd0a
commit 96037591c5
1 changed files with 5 additions and 3 deletions

View File

@ -762,12 +762,14 @@ int FOOTPRINT::GetLikelyAttribute() const
} }
} }
if( smd_count > 0 ) // Footprints with plated through-hole pads should usually be marked through hole even if they
return FP_SMD; // also have SMD because they might not be auto-placed. Exceptions to this might be shielded
if( tht_count > 0 ) if( tht_count > 0 )
return FP_THROUGH_HOLE; return FP_THROUGH_HOLE;
if( smd_count > 0 )
return FP_SMD;
return 0; return 0;
} }