7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

Fix project settings not actually saving after migration

This commit is contained in:
Jon Evans 2025-01-10 08:26:18 -05:00
parent 80303b4caa
commit ab5bdd2882
3 changed files with 13 additions and 3 deletions

View File

@ -637,7 +637,14 @@ bool PROJECT_FILE::SaveToFile( const wxString& aDirectory, bool aForce )
Set( "meta.filename", m_project->GetProjectName() + "." + FILEEXT::ProjectFileExtension );
return JSON_SETTINGS::SaveToFile( aDirectory, aForce );
// Even if parameters were not modified, we should resave after migration
bool force = aForce || m_wasMigrated;
// If we're actually going ahead and doing the save, the flag that keeps code from doing the save
// should be cleared at this
m_wasMigrated = false;
return JSON_SETTINGS::SaveToFile( aDirectory, force );
}

View File

@ -487,11 +487,14 @@ bool PROJECT_LOCAL_SETTINGS::SaveToFile( const wxString& aDirectory, bool aForce
Set( "meta.filename",
m_project->GetProjectName() + "." + FILEEXT::ProjectLocalSettingsFileExtension );
// Even if parameters were not modified, we should resave after migration
bool force = aForce || m_wasMigrated;
// If we're actually going ahead and doing the save, the flag that keeps code from doing the save
// should be cleared at this point
m_wasMigrated = false;
return JSON_SETTINGS::SaveToFile( aDirectory, aForce );
return JSON_SETTINGS::SaveToFile( aDirectory, force );
}

View File

@ -1223,8 +1223,8 @@ bool SCH_EDIT_FRAME::SaveProject( bool aSaveAs )
}
else
{
saveProjectSettings();
SaveProjectLocalSettings();
saveProjectSettings();
}
if( !Kiface().IsSingle() )