From ef4dded9155cd83831b0168e40c8854e00aab1e3 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 29 May 2023 14:20:57 +0200 Subject: [PATCH] PCB_TEXT::TransformTextToPolySet(): fix incorrect param when calling Inflate() This incorrect value created hang when clicking on a pcb text. --- pcbnew/pcb_text.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/pcb_text.cpp b/pcbnew/pcb_text.cpp index 5c6eff629c..0e0ac165b7 100644 --- a/pcbnew/pcb_text.cpp +++ b/pcbnew/pcb_text.cpp @@ -512,7 +512,11 @@ void PCB_TEXT::TransformTextToPolySet( SHAPE_POLY_SET& aBuffer, int aClearance, else { if( aClearance > 0 ) - textShape.Inflate( aClearance, aClearance ); + { + // Number of segments to approximate a circle when inflating a polygon + const int circleSegmentsCount = 16; + textShape.Inflate( aClearance, circleSegmentsCount ); + } aBuffer.Append( textShape ); }