Fix bug in footrpint editor when creating circular arrays. (fixes lp:1424331)

This commit is contained in:
John Beard 2015-02-28 12:39:05 -05:00 committed by Wayne Stambaugh
parent 00f8994ee1
commit 873e0740e8
4 changed files with 17 additions and 0 deletions

View File

@ -324,3 +324,12 @@ void EDGE_MODULE::Flip( const wxPoint& aCentre )
SetLayer( FlipLayer( GetLayer() ) );
}
void EDGE_MODULE::Rotate( const wxPoint& aRotCentre, double aAngle )
{
// do the base class rotation
DRAWSEGMENT::Rotate( aRotCentre, aAngle );
// and now work out the new offset
SetLocalCoord();
}

View File

@ -100,6 +100,8 @@ public:
EDA_ITEM* Clone() const;
void Rotate( const wxPoint& aRotCentre, double aAngle ); // override
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif

View File

@ -838,6 +838,9 @@ void D_PAD::Rotate( const wxPoint& aRotCentre, double aAngle )
{
RotatePoint( &m_Pos, aRotCentre, aAngle );
m_Orient += aAngle;
NORMALIZE_ANGLE_360( m_Orient );
SetLocalCoord();
}

View File

@ -90,8 +90,11 @@ TEXTE_MODULE::~TEXTE_MODULE()
void TEXTE_MODULE::Rotate( const wxPoint& aRotCentre, double aAngle )
{
RotatePoint( &m_Pos, aRotCentre, aAngle );
m_Orient += aAngle;
NORMALIZE_ANGLE_360( m_Orient );
SetLocalCoord();
}