From c93b012627d7571aea1a7224bd32feca35adc155 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Sun, 7 Feb 2021 22:40:56 +0000 Subject: [PATCH] Fix writing out of dummy files in the project manager Fixes https://gitlab.com/kicad/code/kicad/issues/7453 --- kicad/kicad_manager_frame.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/kicad/kicad_manager_frame.cpp b/kicad/kicad_manager_frame.cpp index 55ee50cf76..423e57d7d7 100644 --- a/kicad/kicad_manager_frame.cpp +++ b/kicad/kicad_manager_frame.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -507,9 +508,10 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxFileName& aProjectFileName, wxFFile file( fn.GetFullPath(), "wb" ); if( file.IsOpened() ) - file.Write( wxT( "(kicad_sch (version 20200310) (host eeschema \"unknown\")\n" - "( page \"A4\")\n (lib_symbols)\n" - " (symbol_instances)\n)\n" ) ); + file.Write( wxString::Format( "(kicad_sch (version %d) (generator eeschema)\n" + " (paper \"A4\")\n (lib_symbols)\n" + " (symbol_instances)\n)\n", + SEXPR_SCHEMATIC_FILE_VERSION ) ); // wxFFile dtor will close the file @@ -527,7 +529,7 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxFileName& aProjectFileName, if( file.IsOpened() ) // Create a small dummy file as a stub for pcbnew: - file.Write( wxString::Format( "(kicad_pcb (version %d) (host pcbnew)\n)", + file.Write( wxString::Format( "(kicad_pcb (version %d) (generator pcbnew)\n)", SEXPR_BOARD_FILE_VERSION ) ); // wxFFile dtor will close the file