Save ERC settings (including exclusions) when saving file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15274
This commit is contained in:
Jeff Young 2023-08-28 13:27:00 +01:00
parent b5cfd91268
commit 10ed1d1a7f
2 changed files with 13 additions and 1 deletions

View File

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

View File

@ -728,6 +728,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