Fix legacy schematic I/O symbol library parser bug.

Apparently symbol definition blocks can have a '0' character in the lock
position which is typically defined as 'L' or 'F'.  This must have been
a oversight at some point since both versions of the DEF parameters
exist in library version 2.3 files.

Disable the symbol library cache buffering after saving.
This commit is contained in:
Wayne Stambaugh 2017-02-14 14:49:22 -05:00
parent 92a2b2b684
commit 58ed5466b4
2 changed files with 3 additions and 2 deletions

View File

@ -113,6 +113,7 @@ bool SCH_EDIT_FRAME::CreateArchiveLibrary( const wxString& aFileName )
try
{
cacheLib->Save( false );
cacheLib->EnableBuffering( false );
}
catch( ... /* IO_ERROR ioe */ )
{

View File

@ -2411,10 +2411,10 @@ LIB_PART* SCH_LEGACY_PLUGIN_CACHE::loadPart( FILE_LINE_READER& aReader )
if( locked == 'L' )
part->LockUnits( true );
else if( locked == 'F' )
else if( locked == 'F' || locked == '0' )
part->LockUnits( false );
else
SCH_PARSE_ERROR( "expected L or F", aReader, line );
SCH_PARSE_ERROR( "expected L, F, or 0", aReader, line );
}