From c8a383a48e8814d7d819c2b81b7673649788b533 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 15 Jul 2022 11:40:27 -0700 Subject: [PATCH] Get via font fill/color correct when highlighted Fixes https://gitlab.com/kicad/code/kicad/issues/11802 --- pcbnew/pcb_painter.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 50d1fde6b4..6f1b0e6213 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -799,7 +799,15 @@ void PCB_PAINTER::draw( const PCB_VIA* aVia, int aLayer ) // Default font settings m_gal->ResetTextAttributes(); + m_gal->SetHorizontalJustify( GR_TEXT_H_ALIGN_CENTER ); + m_gal->SetVerticalJustify( GR_TEXT_V_ALIGN_CENTER ); + m_gal->SetFontBold( false ); + m_gal->SetFontItalic( false ); + m_gal->SetFontUnderlined( false ); + m_gal->SetTextMirrored( false ); m_gal->SetStrokeColor( m_pcbSettings.GetColor( nullptr, aLayer ) ); + m_gal->SetIsStroke( true ); + m_gal->SetIsFill( false ); // Set the text position to the pad shape position (the pad position is not the best place) VECTOR2D textpos( 0.0, 0.0 ); @@ -1004,6 +1012,7 @@ void PCB_PAINTER::draw( const PAD* aPad, int aLayer ) size = maxSize; // Default font settings + m_gal->ResetTextAttributes(); m_gal->SetHorizontalJustify( GR_TEXT_H_ALIGN_CENTER ); m_gal->SetVerticalJustify( GR_TEXT_V_ALIGN_CENTER ); m_gal->SetFontBold( false );