From 8fa04eeb75be31fb49937e7f9cb64ac0ec6dc4af Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 31 Aug 2021 17:04:03 +0200 Subject: [PATCH] FP_TEXT::TransformShapeWithClearanceToPolygon(): fix broken rotation of the shape. Only the FP_TEXT shape must be rotated, not the full buffer used for storage. Fixes #9057 https://gitlab.com/kicad/code/kicad/issues/9057 --- pcbnew/board_items_to_polygon_shape_transform.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index 1f0c33ad5b..f0625cb1d3 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -311,12 +311,15 @@ void FP_TEXT::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffe int aError, ERROR_LOC aErrorLoc, bool aIgnoreLineWidth ) const { - EDA_TEXT::TransformBoundingBoxWithClearanceToPolygon( &aCornerBuffer, aClearance ); + SHAPE_POLY_SET buffer; + EDA_TEXT::TransformBoundingBoxWithClearanceToPolygon( &buffer, aClearance ); const FOOTPRINT* parentFootprint = static_cast( m_parent ); if( parentFootprint ) - aCornerBuffer.Rotate( DECIDEG2RAD( GetDrawRotation() ), GetTextPos() ); + buffer.Rotate( DECIDEG2RAD( GetDrawRotation() ), GetTextPos() ); + + aCornerBuffer.Append( buffer ); }