From f22f5f47cb84400c258749aeefcce6f1a2164738 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 14 Mar 2024 17:39:31 +0000 Subject: [PATCH] Reset penWidth before stroking. (PlotPoly will have set it to "1".) Fixes https://gitlab.com/kicad/code/kicad/-/issues/17218 --- common/plotters/plotter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/plotters/plotter.cpp b/common/plotters/plotter.cpp index a62aff9faf..ffa378b5f5 100644 --- a/common/plotters/plotter.cpp +++ b/common/plotters/plotter.cpp @@ -706,7 +706,6 @@ void PLOTTER::Text( const VECTOR2I& aPos, KIGFX::GAL_DISPLAY_OPTIONS empty_opts; SetColor( aColor ); - SetCurrentLineWidth( aPenWidth, aData ); if( aPenWidth == 0 && aBold ) // Use default values if aPenWidth == 0 aPenWidth = GetPenSizeForBold( std::min( aSize.x, aSize.y ) ); @@ -718,6 +717,7 @@ void PLOTTER::Text( const VECTOR2I& aPos, // Stroke callback [&]( const VECTOR2I& aPt1, const VECTOR2I& aPt2 ) { + SetCurrentLineWidth( aPenWidth ); MoveTo( aPt1 ); LineTo( aPt2 ); PenFinish();