From 2932fe1e64e83fe60cc3c77d6d6cd34eadd63f2c Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 21 Nov 2020 23:52:36 +0000 Subject: [PATCH] Fix rotation of dimension objects. Fixes https://gitlab.com/kicad/code/kicad/issues/6424 --- pcbnew/dimension.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 6989d114e0..5508ed2508 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -239,6 +239,13 @@ void DIMENSION_BASE::Rotate( const wxPoint& aRotCentre, double aAngle ) m_text.SetTextAngle( newAngle ); + wxPoint pt = m_text.GetTextPos(); + RotatePoint( &pt, aRotCentre, aAngle ); + m_text.SetTextPos( pt ); + + RotatePoint( &m_start, aRotCentre, aAngle ); + RotatePoint( &m_end, aRotCentre, aAngle ); + Update(); }