From 9f61254839ea95e38752a2a3f12197834fad7f63 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 2 Aug 2015 11:19:01 +0200 Subject: [PATCH] Fix bug #1480619 (Moving silkscreen reference of rotated footprints glitches in GAL) --- pcbnew/class_text_mod.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 42653561b6..10a3927bb1 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -111,6 +111,7 @@ void TEXTE_MODULE::Mirror( const wxPoint& aCentre, bool aMirrorAroundXAxis ) MIRROR( m_Pos.y, aCentre.y ); else MIRROR( m_Pos.x, aCentre.x ); + NEGATE_AND_NORMALIZE_ANGLE_POS( m_Orient ); SetLocalCoord(); } @@ -118,9 +119,8 @@ void TEXTE_MODULE::Mirror( const wxPoint& aCentre, bool aMirrorAroundXAxis ) void TEXTE_MODULE::Move( const wxPoint& aMoveVector ) { - // Used in modedit, to transform the footprint - m_Pos0 += aMoveVector; - SetDrawCoord();; + m_Pos += aMoveVector; + SetLocalCoord(); } void TEXTE_MODULE::Copy( TEXTE_MODULE* source ) @@ -282,8 +282,7 @@ void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode, width = -width; GRSetDrawMode( DC, draw_mode ); - wxPoint pos( m_Pos.x - offset.x, - m_Pos.y - offset.y); + wxPoint pos = m_Pos - offset; // Draw the text anchor point if( brd->IsElementVisible( ANCHOR_VISIBLE ) )