Correct initialization of justification.

Fixes https://gitlab.com/kicad/code/kicad/issues/11248
This commit is contained in:
Jeff Young 2022-03-28 17:10:59 +01:00
parent 47f4503564
commit a2d4351b97
1 changed files with 4 additions and 0 deletions

View File

@ -408,6 +408,10 @@ void PCB_PARSER::parseEDA_TEXT( EDA_TEXT* aText )
wxCHECK_RET( CurTok() == T_effects, wxCHECK_RET( CurTok() == T_effects,
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as EDA_TEXT." ) ); wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as EDA_TEXT." ) );
// These are not written out if center/center, so we have to make sure we start that way.
aText->SetHorizJustify( GR_TEXT_H_ALIGN_CENTER );
aText->SetVertJustify( GR_TEXT_V_ALIGN_CENTER );
// In version 20210606 the notation for overbars was changed from `~...~` to `~{...}`. // In version 20210606 the notation for overbars was changed from `~...~` to `~{...}`.
// We need to convert the old syntax to the new one. // We need to convert the old syntax to the new one.
if( m_requiredVersion < 20210606 ) if( m_requiredVersion < 20210606 )