Handle global label offset when plotting.

Fixes https://gitlab.com/kicad/code/kicad/issues/13301
This commit is contained in:
Jeff Young 2023-02-09 18:01:46 +00:00
parent 538ee12188
commit d4ca54a798
1 changed files with 5 additions and 0 deletions

View File

@ -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<SCH_GLOBALLABEL*>( m_parent );
textpos += label->GetSchematicTextOffset( settings );
}
KIFONT::FONT* font = GetFont();