From 4618c64213676e876bd05939a0285cffbe9b5ff9 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 24 Jul 2018 10:39:18 +0100 Subject: [PATCH] Don't number aperture pads. Fixes: lp:1781760 * https://bugs.launchpad.net/kicad/+bug/1781760 --- pcbnew/array_creator.cpp | 9 +++++---- pcbnew/class_pad.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pcbnew/array_creator.cpp b/pcbnew/array_creator.cpp index 1941bfa6ca..e1776c8dd6 100644 --- a/pcbnew/array_creator.cpp +++ b/pcbnew/array_creator.cpp @@ -99,12 +99,13 @@ void ARRAY_CREATOR::Invoke() // implicit numbering by incrementing the items during creation if( new_item && array_opts->NumberingStartIsSpecified() ) { - // Renumber pads. Only new pad number renumbering has meaning, - // in the footprint editor. + // Renumber non-aperture pads. if( new_item->Type() == PCB_PAD_T ) { - const wxString padName = array_opts->GetItemNumber( ptN ); - static_cast( new_item )->SetName( padName ); + D_PAD* pad = static_cast( new_item ); + + if( !pad->IsAperturePad() ) + pad->SetName( array_opts->GetItemNumber( ptN ) ); } } } diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index e7e2d6f70b..c8af03d6c4 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -399,6 +399,7 @@ public: void SetLayerSet( LSET aLayerMask ) { m_layerMask = aLayerMask; } LSET GetLayerSet() const override { return m_layerMask; } + bool IsAperturePad() const { return ( m_layerMask & LSET::AllCuMask() ).none(); } void SetAttribute( PAD_ATTR_T aAttribute ); PAD_ATTR_T GetAttribute() const { return m_Attribute; }