Various text object defaults don't necessarily match file defaults.

Fixes https://gitlab.com/kicad/code/kicad/issues/10862
This commit is contained in:
Jeff Young 2022-02-15 23:25:25 +00:00
parent d9507dbaf4
commit bc7742cb2e
1 changed files with 5 additions and 0 deletions

View File

@ -552,6 +552,11 @@ void SCH_SEXPR_PARSER::parseEDA_TEXT( EDA_TEXT* aText, bool aConvertOverbarSynta
T token;
wxString faceName;
// Various text objects (text boxes, schematic text, etc.) all have their own defaults,
// but the file format default is {center,center} so we have to set that before parsing.
aText->SetHorizJustify( GR_TEXT_H_ALIGN_CENTER );
aText->SetVertJustify( GR_TEXT_V_ALIGN_CENTER );
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
{
if( token == T_LEFT )