Make sure project is unlinked before deleting it
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7038
This commit is contained in:
parent
8a1a1aba5d
commit
01181ccb2f
|
@ -581,9 +581,6 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
// consumming, so display a busy cursor
|
||||
wxBusyCursor dummy;
|
||||
|
||||
// Unlink the old project if needed
|
||||
GetBoard()->ClearProject();
|
||||
|
||||
// No save prompt (we already prompted above), and only reset to a new blank board if new
|
||||
Clear_Pcb( false, !is_new );
|
||||
|
||||
|
@ -603,6 +600,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
// calls SaveProject
|
||||
SaveProjectSettings();
|
||||
|
||||
GetBoard()->ClearProject();
|
||||
mgr->UnloadProject( &mgr->Prj() );
|
||||
|
||||
mgr->LoadProject( pro.GetFullPath() );
|
||||
|
|
Loading…
Reference in New Issue