Kicad manager: create a minimal .kicad_pro file when creating a project from scratch.
Fixes #4889 https://gitlab.com/kicad/code/kicad/issues/4889
This commit is contained in:
parent
5ba0855c36
commit
6296b4e20b
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -78,7 +78,7 @@ ERC_ITEM ERC_ITEM::globalLabelDangling( ERCE_GLOBLABEL,
|
|||
wxT( "global_label_dangling" ) );
|
||||
|
||||
ERC_ITEM ERC_ITEM::similarLabels( ERCE_SIMILAR_LABELS,
|
||||
_( "Labels are similar (lower/upper case difference only) "),
|
||||
_( "Labels are similar (lower/upper case difference only)"),
|
||||
wxT( "similar_labels" ) );
|
||||
|
||||
ERC_ITEM ERC_ITEM::differentUnitFootprint( ERCE_DIFFERENT_UNIT_FP,
|
||||
|
|
|
@ -413,7 +413,11 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxFileName& aProjectFileName )
|
|||
if( !wxFileName::FileExists( srcFileName )
|
||||
|| !wxCopyFile( srcFileName, destFileName.GetFullPath() ) )
|
||||
{
|
||||
Pgm().GetSettingsManager().SaveProject();
|
||||
wxFile file( destFileName.GetFullPath(), wxFile::write );
|
||||
|
||||
if( file.IsOpened() )
|
||||
file.Write( wxT( "{\n}\n") );
|
||||
// wxFile dtor will close the file
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue