footprint reader: fix broken handling of "Keep Upright" option.

texts inside footprints must have this option ON by default.
When disable, the keyword "unlocked" must be in field description.
This commit is contained in:
jean-pierre charras 2023-06-25 12:44:11 +02:00
parent 84a63f7daa
commit 44810e8c09
1 changed files with 4 additions and 0 deletions

View File

@ -3052,6 +3052,10 @@ void PCB_PARSER::parsePCB_TEXT_effects( PCB_TEXT* aText )
{
FOOTPRINT* parentFP = dynamic_cast<FOOTPRINT*>( aText->GetParent() );
// By default, texts in footprints have a locked rotation (i.e. rot = -90 ... 90 deg)
if( parentFP )
aText->SetKeepUpright( true );
for( T token = NextTok(); token != T_RIGHT; token = NextTok() )
{
if( token == T_LEFT )