Make pad flipping work both from parent footprint *and* individually.
The last fix was for individual pads, but it broke when the whole footprint was flipped for rotated footprints. Fixes https://gitlab.com/kicad/code/kicad/-/issues/14829
This commit is contained in:
parent
d827bb8a1f
commit
8baf2a832f
|
@ -1614,14 +1614,18 @@ void FOOTPRINT::Flip( const VECTOR2I& aCentre, bool aFlipLeftRight )
|
|||
// Flip layer
|
||||
BOARD_ITEM::SetLayer( FlipLayer( GetLayer() ) );
|
||||
|
||||
// Reverse mirror orientation.
|
||||
m_orient = -m_orient;
|
||||
m_orient.Normalize180();
|
||||
// Calculate the new orientation, and then clear it for pad flipping.
|
||||
EDA_ANGLE newOrientation = -m_orient;
|
||||
newOrientation.Normalize180();
|
||||
m_orient = ANGLE_0;
|
||||
|
||||
// Mirror pads to other side of board.
|
||||
for( PAD* pad : m_pads )
|
||||
pad->Flip( m_pos, false );
|
||||
|
||||
// Now set the new orientation.
|
||||
m_orient = newOrientation;
|
||||
|
||||
// Mirror zones to other side of board.
|
||||
for( ZONE* zone : m_zones )
|
||||
zone->Flip( m_pos, false );
|
||||
|
|
Loading…
Reference in New Issue