Move quitting flag to manager quit

The flag is to protect against the frame going out of scope with the
references intact.  This shouldn't be in CloseProject because we close
the project without removing the frame.  Instead, placing it in OnExit
gets set correctly when closing the whole project manager

Fixes https://gitlab.com/kicad/code/kicad/issues/10018
This commit is contained in:
Seth Hillbrand 2021-12-16 14:26:27 -08:00 committed by Wayne Stambaugh
parent 700a334955
commit a4db439cf8
1 changed files with 1 additions and 2 deletions

View File

@ -394,6 +394,7 @@ void KICAD_MANAGER_FRAME::doCloseWindow()
#endif
m_leftWin->Show( false );
Pgm().m_Quitting = true;
Destroy();
@ -435,8 +436,6 @@ bool KICAD_MANAGER_FRAME::CloseProject( bool aSave )
m_leftWin->EmptyTreePrj();
Pgm().m_Quitting = true;
return true;
}