PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(): ensure texts are not mirrored

When not specified as mirrored, texts must be not mirrored.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17955
This commit is contained in:
jean-pierre charras 2024-05-06 10:53:39 +02:00
parent c7dd993439
commit 6d69fee097
1 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 CERN
* Copyright (C) 2012-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2012-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -487,9 +487,12 @@ void PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT( EDA_TEXT* aText )
wxCHECK_RET( CurTok() == T_effects,
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.
// These are not written out if center/center and/or no mirror,
// so we have to make sure we start that way.
// (these parameters will be set in T_justify section, when existing)
aText->SetHorizJustify( GR_TEXT_H_ALIGN_CENTER );
aText->SetVertJustify( GR_TEXT_V_ALIGN_CENTER );
aText->SetMirrored( false );
// In version 20210606 the notation for overbars was changed from `~...~` to `~{...}`.
// We need to convert the old syntax to the new one.