Wait for work to be finished before shutting down

Stopping the timers isn't sufficient, also wait for in-flight work to be
finished first.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser 2026-07-14 10:57:33 +02:00
parent 2fae39df3b
commit 63629195ba
No known key found for this signature in database

View file

@ -693,6 +693,9 @@ void ScenarioEditor::OnClose(wxCloseEvent& event)
m_Timer.Stop(); m_Timer.Stop();
m_RenderTimer.Stop(); m_RenderTimer.Stop();
// Wait for in-flight work to finish.
qPing qry;
qry.Post();
m_ToolManager.SetCurrentTool(_T("")); m_ToolManager.SetCurrentTool(_T(""));