mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02:00
Clean up stale nested settings when changing project pointer
This commit is contained in:
parent
498fa8d8ba
commit
1c72042fc4
@ -69,6 +69,17 @@ void SCHEMATIC::Reset()
|
|||||||
|
|
||||||
void SCHEMATIC::SetProject( PROJECT* aPrj )
|
void SCHEMATIC::SetProject( PROJECT* aPrj )
|
||||||
{
|
{
|
||||||
|
if( m_project )
|
||||||
|
{
|
||||||
|
PROJECT_FILE& project = m_project->GetProjectFile();
|
||||||
|
|
||||||
|
delete project.m_ErcSettings;
|
||||||
|
delete project.m_SchematicSettings;
|
||||||
|
|
||||||
|
project.m_ErcSettings = nullptr;
|
||||||
|
project.m_SchematicSettings = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
m_project = aPrj;
|
m_project = aPrj;
|
||||||
|
|
||||||
if( m_project )
|
if( m_project )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user