From fa0124bee7c957b0f9eb7a0013cbd6be0d24c55a Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 6 Sep 2018 23:08:12 +0100 Subject: [PATCH] Enforce a minimum line thickness for labels. --- eeschema/sch_painter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 9f64e858f4..23dd88b337 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -1127,6 +1127,7 @@ void SCH_PAINTER::draw( SCH_FIELD *aField, int aLayer ) void SCH_PAINTER::draw( SCH_GLOBALLABEL *aLabel, int aLayer ) { COLOR4D color = m_schSettings.GetLayerColor( LAYER_GLOBLABEL ); + int width = aLabel->GetThickness() ? aLabel->GetThickness() : GetDefaultLineThickness(); if( aLabel->IsMoving() ) color = selectedBrightening( color ); @@ -1141,7 +1142,7 @@ void SCH_PAINTER::draw( SCH_GLOBALLABEL *aLabel, int aLayer ) m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); - m_gal->SetLineWidth( aLabel->GetThickness() ); + m_gal->SetLineWidth( width ); m_gal->SetStrokeColor( color ); m_gal->DrawPolyline( pts2 ); @@ -1152,6 +1153,7 @@ void SCH_PAINTER::draw( SCH_GLOBALLABEL *aLabel, int aLayer ) void SCH_PAINTER::draw( SCH_HIERLABEL *aLabel, int aLayer ) { COLOR4D color = m_schSettings.GetLayerColor( LAYER_SHEETLABEL ); + int width = aLabel->GetThickness() ? aLabel->GetThickness() : GetDefaultLineThickness(); if( aLabel->IsMoving() ) color = selectedBrightening( color ); @@ -1166,7 +1168,7 @@ void SCH_PAINTER::draw( SCH_HIERLABEL *aLabel, int aLayer ) m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); - m_gal->SetLineWidth( aLabel->GetThickness() ); + m_gal->SetLineWidth( width ); m_gal->SetStrokeColor( color ); m_gal->DrawPolyline( pts2 );