Kicad project manager: when creating a new project, creates a better empty .sch file compatible with the new schematic legacy file parser.

This commit is contained in:
jean-pierre charras 2016-07-20 09:05:42 +02:00
parent 7434e68876
commit 3389529643
1 changed files with 3 additions and 1 deletions

View File

@ -170,12 +170,14 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxString& aPrjFullFileName,
fn.SetExt( SchematicFileExtension );
// If a <project>.sch file does not exist, create a "stub" file
// ( minimal schematic file )
if( !fn.FileExists() )
{
wxFile file( fn.GetFullPath(), wxFile::write );
if( file.IsOpened() )
file.Write( wxT( "EESchema Schematic File Version 2\n" ) );
file.Write( wxT( "EESchema Schematic File Version 2\n"
"EELAYER 25 0\nEELAYER END\n$EndSCHEMATC\n" ) );
// wxFile dtor will close the file
}