sch legacy plugin: fix a compatibility issue with old schematic files
This commit is contained in:
parent
6078ca85e5
commit
a5178c70db
|
@ -1358,6 +1358,8 @@ SCH_COMPONENT* SCH_LEGACY_PLUGIN::loadComponent( FILE_LINE_READER& aReader )
|
||||||
"B, T, or C" ), aReader, line );
|
"B, T, or C" ), aReader, line );
|
||||||
|
|
||||||
// Newer file formats include the bold and italics text attribute.
|
// Newer file formats include the bold and italics text attribute.
|
||||||
|
if( textAttrs.Length() > 1 )
|
||||||
|
{
|
||||||
if( textAttrs.Length() != 3 )
|
if( textAttrs.Length() != 3 )
|
||||||
SCH_PARSE_ERROR( _( "component field text attributes must be 3 characters wide" ),
|
SCH_PARSE_ERROR( _( "component field text attributes must be 3 characters wide" ),
|
||||||
aReader, line );
|
aReader, line );
|
||||||
|
@ -1374,6 +1376,7 @@ SCH_COMPONENT* SCH_LEGACY_PLUGIN::loadComponent( FILE_LINE_READER& aReader )
|
||||||
SCH_PARSE_ERROR( _( "component field text bold indicator must be B or N" ),
|
SCH_PARSE_ERROR( _( "component field text bold indicator must be B or N" ),
|
||||||
aReader, line );
|
aReader, line );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
component->GetField( index )->SetText( text );
|
component->GetField( index )->SetText( text );
|
||||||
component->GetField( index )->SetTextPosition( pos );
|
component->GetField( index )->SetTextPosition( pos );
|
||||||
|
|
Loading…
Reference in New Issue