Don't number aperture pads.

Fixes: lp:1781760
* https://bugs.launchpad.net/kicad/+bug/1781760
This commit is contained in:
Jeff Young 2018-07-24 10:39:18 +01:00
parent f79ca271e3
commit 4618c64213
2 changed files with 6 additions and 4 deletions

View File

@ -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<D_PAD*>( new_item )->SetName( padName );
D_PAD* pad = static_cast<D_PAD*>( new_item );
if( !pad->IsAperturePad() )
pad->SetName( array_opts->GetItemNumber( ptN ) );
}
}
}

View File

@ -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; }