7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 19:43:44 +00:00

LSET Flip needs copper layer count now

This commit is contained in:
Jon Evans 2024-10-27 22:06:50 -04:00
parent ae045a2eea
commit 69ddbeb43f

View File

@ -931,12 +931,14 @@ void PAD::Flip( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection )
}
} );
// Flip pads layers
LSET layerSet = m_padStack.LayerSet();
SetLayerSet( layerSet.Flip() );
// Flip padstack geometry
m_padStack.FlipLayers( BoardCopperLayerCount() );
int copperLayerCount = BoardCopperLayerCount();
m_padStack.FlipLayers( copperLayerCount );
// Flip pads layers after padstack geometry
LSET layerSet = m_padStack.LayerSet();
SetLayerSet( layerSet.Flip( copperLayerCount ) );
// Flip the basic shapes, in custom pads
FlipPrimitives( aFlipDirection );