sch legacy plugin: fix compatibility with old and very old library and symbol files
This commit is contained in:
parent
64c892ee23
commit
308dc0e46a
|
@ -2117,7 +2117,12 @@ void SCH_LEGACY_PLUGIN_CACHE::Load()
|
|||
const char* line = reader.Line();
|
||||
|
||||
if( !strCompare( "EESchema-LIBRARY Version", line, &line ) )
|
||||
SCH_PARSE_ERROR( "file is not a valid component or symbol library file", reader, line );
|
||||
{
|
||||
// Old .sym files (which are libraries with only one symbol, used to store and reuse shapes)
|
||||
// EESchema-LIB Version x.x SYMBOL. They are valid files.
|
||||
if( !strCompare( "EESchema-LIB Version", line, &line ) )
|
||||
SCH_PARSE_ERROR( "file is not a valid component or symbol library file", reader, line );
|
||||
}
|
||||
|
||||
m_versionMajor = parseInt( reader, line, &line );
|
||||
|
||||
|
@ -2735,7 +2740,11 @@ LIB_ARC* SCH_LEGACY_PLUGIN_CACHE::loadArc( std::unique_ptr< LIB_PART >& aPart,
|
|||
arc->SetUnit( parseInt( aReader, line, &line ) );
|
||||
arc->SetConvert( parseInt( aReader, line, &line ) );
|
||||
arc->SetWidth( parseInt( aReader, line, &line ) );
|
||||
arc->SetFillMode( parseFillMode( aReader, line, &line ) );
|
||||
|
||||
// Old libraries (version <= 2.2) do not have always this FILL MODE param
|
||||
// when fill mode is no fill (default mode).
|
||||
if( *line != 0 )
|
||||
arc->SetFillMode( parseFillMode( aReader, line, &line ) );
|
||||
|
||||
// Actual Coordinates of arc ends are read from file
|
||||
if( *line != 0 )
|
||||
|
|
Loading…
Reference in New Issue