diff --git a/eeschema/sch_legacy_plugin.cpp b/eeschema/sch_legacy_plugin.cpp index 2d823a8748..e2d58ecc45 100644 --- a/eeschema/sch_legacy_plugin.cpp +++ b/eeschema/sch_legacy_plugin.cpp @@ -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 )