Save project to disk whenever we save the board to disk.
This prevents data loss in the event of a subsequent crash. Fixes https://gitlab.com/kicad/code/kicad/-/issues/14991
This commit is contained in:
parent
1b7473c353
commit
3bdc66d3ed
|
@ -1042,7 +1042,11 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool addToHistory,
|
|||
projectFile.SetExt( ProjectFileExtension );
|
||||
rulesFile.SetExt( DesignRulesFileExtension );
|
||||
|
||||
if( !projectFile.FileExists() && aChangeProject )
|
||||
if( projectFile.FileExists() )
|
||||
{
|
||||
GetSettingsManager()->SaveProject();
|
||||
}
|
||||
else if( aChangeProject )
|
||||
{
|
||||
Prj().SetReadOnly( false );
|
||||
GetSettingsManager()->SaveProjectAs( projectFile.GetFullPath() );
|
||||
|
|
Loading…
Reference in New Issue