mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Be careful not to unload current project if settings imported from it.
Fixes https://gitlab.com/kicad/code/kicad/issues/5684
This commit is contained in:
parent
471f81742f
commit
e202dba386
@ -185,7 +185,8 @@ void DIALOG_BOARD_SETUP::OnAuxiliaryAction( wxCommandEvent& event )
|
|||||||
DisplayErrorMessage( this, msg, ioe.What() );
|
DisplayErrorMessage( this, msg, ioe.What() );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_frame->GetSettingsManager()->UnloadProject( otherPrj, false );
|
if( otherPrj != &m_frame->Prj() )
|
||||||
|
m_frame->GetSettingsManager()->UnloadProject( otherPrj, false );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -228,11 +229,13 @@ void DIALOG_BOARD_SETUP::OnAuxiliaryAction( wxCommandEvent& event )
|
|||||||
if( importDlg.m_SeveritiesOpt->GetValue() )
|
if( importDlg.m_SeveritiesOpt->GetValue() )
|
||||||
m_severities->ImportSettingsFrom( otherBoard->GetDesignSettings().m_DRCSeverities );
|
m_severities->ImportSettingsFrom( otherBoard->GetDesignSettings().m_DRCSeverities );
|
||||||
|
|
||||||
otherBoard->ClearProject();
|
if( otherPrj != &m_frame->Prj() )
|
||||||
|
otherBoard->ClearProject();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean up and free memory before leaving
|
// Clean up and free memory before leaving
|
||||||
m_frame->GetSettingsManager()->UnloadProject( otherPrj, false );
|
if( otherPrj != &m_frame->Prj() )
|
||||||
|
m_frame->GetSettingsManager()->UnloadProject( otherPrj, false );
|
||||||
|
|
||||||
delete otherBoard;
|
delete otherBoard;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user