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
(cherry picked from commit 3bdc66d3ed
)
This commit is contained in:
parent
b294530716
commit
60fe2ce30e
|
@ -1052,7 +1052,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