diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp index cb4aedc191..041d3cc149 100644 --- a/pcbnew/class_edge_mod.cpp +++ b/pcbnew/class_edge_mod.cpp @@ -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(); +} diff --git a/pcbnew/class_edge_mod.h b/pcbnew/class_edge_mod.h index 65f83ee994..1230ee87c8 100644 --- a/pcbnew/class_edge_mod.h +++ b/pcbnew/class_edge_mod.h @@ -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 diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index d189b31dec..0916e9b6ab 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -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(); } diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index c698aba4b5..619710946b 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -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(); }