Save ERC settings (including exclusions) when saving file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15274

(cherry picked from commit 10ed1d1a7f)
This commit is contained in:
Jeff Young 2023-08-28 13:27:00 +01:00
parent 480a9ac77d
commit 1fee2c626b
2 changed files with 13 additions and 1 deletions

View File

@ -164,7 +164,8 @@ void SCH_EDIT_FRAME::saveProjectSettings()
void SCH_EDIT_FRAME::SaveProjectLocalSettings()
{
// No schematic local settings yet
if( m_schematic )
m_schematic->RecordERCExclusions();
}

View File

@ -696,6 +696,17 @@ bool SCH_EDIT_FRAME::saveSchematicFile( SCH_SHEET* aSheet, const wxString& aSave
if( !IsWritable( schematicFileName ) )
return false;
wxFileName projectFile( schematicFileName );
projectFile.SetExt( ProjectFileExtension );
if( projectFile.FileExists() )
{
// Save various ERC settings, such as violation severities (which may have been edited
// via the ERC dialog as well as the Schematic Setup dialog), ERC exclusions, etc.
saveProjectSettings();
}
wxString tempFile = wxFileName::CreateTempFileName( wxS( "eeschema" ) );
// Save