From 57d3aef4cd71c5ffe907ac2cdbce6d9ce8df139f Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 18 Aug 2023 22:15:33 +0100 Subject: [PATCH] Correct false comments (no functional changes). --- eeschema/schematic.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/eeschema/schematic.cpp b/eeschema/schematic.cpp index 66f9b1028e..5167fad172 100644 --- a/eeschema/schematic.cpp +++ b/eeschema/schematic.cpp @@ -56,15 +56,16 @@ SCHEMATIC::~SCHEMATIC() void SCHEMATIC::Reset() { - // Assume project already saved if( m_project ) { PROJECT_FILE& project = m_project->GetProjectFile(); + // d'tor will save settings to file delete project.m_ErcSettings; - delete project.m_SchematicSettings; + project.m_ErcSettings = nullptr; - project.m_ErcSettings = nullptr; + // d'tor will save settings to file + delete project.m_SchematicSettings; project.m_SchematicSettings = nullptr; m_project = nullptr; // clear the project, so we don't do this again when setting a new one @@ -85,10 +86,12 @@ void SCHEMATIC::SetProject( PROJECT* aPrj ) { PROJECT_FILE& project = m_project->GetProjectFile(); + // d'tor will save settings to file delete project.m_ErcSettings; - delete project.m_SchematicSettings; + project.m_ErcSettings = nullptr; - project.m_ErcSettings = nullptr; + // d'tor will save settings to file + delete project.m_SchematicSettings; project.m_SchematicSettings = nullptr; }