From d10c8cd75b684ca4f69ae8aebceb2f31daf8c67e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 29 Apr 2020 16:48:21 +0200 Subject: [PATCH] Sheet pins: fix incorrect size and plot thickness of the graphic symbol. Unlike the global labels, the hierarchical label is not inside the graphic symbol. So the graphic symbol size depends only of the text size, not of the text offset. --- eeschema/sch_text.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index e744cfe70b..b608cd40c1 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -625,10 +625,8 @@ void SCH_TEXT::Plot( PLOTTER* aPlotter ) // Draw graphic symbol for global or hierarchical labels CreateGraphicShape( aPlotter->RenderSettings(), Poly, GetTextPos() ); - aPlotter->SetCurrentLineWidth( penWidth ); - if( Poly.size() ) - aPlotter->PlotPoly( Poly, NO_FILL ); + aPlotter->PlotPoly( Poly, NO_FILL, penWidth ); } @@ -1123,10 +1121,10 @@ void SCH_HIERLABEL::Print( RENDER_SETTINGS* aSettings, const wxPoint& offset ) void SCH_HIERLABEL::CreateGraphicShape( RENDER_SETTINGS* aRenderSettings, std::vector& aPoints, const wxPoint& Pos ) { - int margin = GetTextOffset( aRenderSettings ); int* Template = TemplateShape[static_cast( m_shape )][static_cast( m_spin_style )]; - int halfSize = ( GetTextHeight() / 2 ) + margin; - int imax = *Template; Template++; + int halfSize = GetTextHeight() / 2; + int imax = *Template; + Template++; aPoints.clear();