Reset penWidth before stroking.

(PlotPoly will have set it to "1".)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17218

(cherry picked from commit f22f5f47cb)
This commit is contained in:
Jeff Young 2024-03-14 17:39:31 +00:00
parent 838cefaf48
commit af3654d389
1 changed files with 1 additions and 1 deletions

View File

@ -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();