Revert "pad.cpp: fix incorrect layer mask in PAD::SetAttribute() for aperture pad"

This reverts commit 03e2b3c42e.
This commit is contained in:
jean-pierre charras 2024-04-21 11:58:56 +02:00
parent 03e2b3c42e
commit 3fb521755b
1 changed files with 2 additions and 8 deletions

View File

@ -824,11 +824,7 @@ void PAD::SetAttribute( PAD_ATTRIB aAttribute )
else
{
m_layerMask &= ~LSET::AllCuMask();
// A SMD can be a "aperture pad", with no copper layer.
// So ensure we can set the bottom copper layer
if( !IsAperturePad() )
m_layerMask.set( B_Cu );
m_layerMask.set( B_Cu );
}
m_drill = VECTOR2I( 0, 0 );
@ -1683,10 +1679,8 @@ const BOX2I PAD::ViewBBox() const
void PAD::ImportSettingsFrom( const PAD& aMasterPad )
{
SetShape( aMasterPad.GetShape() );
SetAttribute( aMasterPad.GetAttribute() );
// SetAttribute() can change m_layerMask. be sure we keep the original mask
// by calling SetLayerSet() after SetAttribute()
SetLayerSet( aMasterPad.GetLayerSet() );
SetAttribute( aMasterPad.GetAttribute() );
SetProperty( aMasterPad.GetProperty() );
// Must be after setting attribute and layerSet