From e19141bdc8fcc6febe0c7c1112ec3921e5732ee9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 11 May 2019 08:43:58 +0200 Subject: [PATCH] LIB_CIRCLE: fix missing transform of m_EndPos in mirror and rotate. Fixes: lp:1828655 https://bugs.launchpad.net/kicad/+bug/1828655 --- eeschema/lib_circle.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/eeschema/lib_circle.cpp b/eeschema/lib_circle.cpp index 53530534a5..2b0bce2dfa 100644 --- a/eeschema/lib_circle.cpp +++ b/eeschema/lib_circle.cpp @@ -42,7 +42,7 @@ #include -LIB_CIRCLE::LIB_CIRCLE( LIB_PART* aParent ) : +LIB_CIRCLE::LIB_CIRCLE( LIB_PART* aParent ) : LIB_ITEM( LIB_CIRCLE_T, aParent ) { m_Width = 0; @@ -140,6 +140,9 @@ void LIB_CIRCLE::MirrorHorizontal( const wxPoint& aCenter ) m_Pos.x -= aCenter.x; m_Pos.x *= -1; m_Pos.x += aCenter.x; + m_EndPos.x -= aCenter.x; + m_EndPos.x *= -1; + m_EndPos.x += aCenter.x; } @@ -148,6 +151,9 @@ void LIB_CIRCLE::MirrorVertical( const wxPoint& aCenter ) m_Pos.y -= aCenter.y; m_Pos.y *= -1; m_Pos.y += aCenter.y; + m_EndPos.y -= aCenter.y; + m_EndPos.y *= -1; + m_EndPos.y += aCenter.y; } @@ -156,6 +162,7 @@ void LIB_CIRCLE::Rotate( const wxPoint& aCenter, bool aRotateCCW ) int rot_angle = aRotateCCW ? -900 : 900; RotatePoint( &m_Pos, aCenter, rot_angle ); + RotatePoint( &m_EndPos, aCenter, rot_angle ); }