Apply fixes for the ui jobs.

- Localization
- Mutual exclusion (ExclusiveJobGroup), only one UI job can run at a time, and background processing is stopped
- m_range not used for finalization anymore
- stop_jobs called before Window is closed
This commit is contained in:
tamasmeszaros 2019-06-18 16:24:30 +02:00
parent d60ecb3788
commit 468516aa31
3 changed files with 224 additions and 133 deletions

View file

@ -103,14 +103,14 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
event.Veto();
return;
}
if(m_plater) m_plater->stop_jobs();
// Weird things happen as the Paint messages are floating around the windows being destructed.
// Avoid the Paint messages by hiding the main window.
// Also the application closes much faster without these unnecessary screen refreshes.
// In addition, there were some crashes due to the Paint events sent to already destructed windows.
this->Show(false);
if(m_plater) m_plater->stop_jobs();
// Save the slic3r.ini.Usually the ini file is saved from "on idle" callback,
// but in rare cases it may not have been called yet.