From d4ca54a79810f2b9cc02796ddf8c6caf52f62fd6 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 9 Feb 2023 18:01:46 +0000 Subject: [PATCH] Handle global label offset when plotting. Fixes https://gitlab.com/kicad/code/kicad/issues/13301 --- eeschema/sch_field.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index 1c2d7a8dcc..f205047680 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -1010,6 +1010,11 @@ void SCH_FIELD::Plot( PLOTTER* aPlotter, bool aBackground ) const vjustify = GR_TEXT_V_ALIGN_CENTER; textpos = GetBoundingBox().Centre(); } + else if( m_parent && m_parent->Type() == SCH_GLOBAL_LABEL_T ) + { + SCH_GLOBALLABEL* label = static_cast( m_parent ); + textpos += label->GetSchematicTextOffset( settings ); + } KIFONT::FONT* font = GetFont();