- hided the main UI on application quit to create a user experience of a shutdown without lag

- added a way to terminate QThreads safely by waiting; should be much safer
- made sure that the ArgsThread class receive the signal to stop
- made sure that on application shutdown, all workers will quit before the actual exit
This commit is contained in:
Marius Stanciu
2022-09-10 01:06:13 +03:00
committed by Marius
parent 3c1349a6c4
commit 71a3963c96
8 changed files with 36 additions and 20 deletions

View File

@@ -3994,7 +3994,7 @@ class AppGerberEditor(QtCore.QObject):
self.plot_thread = None
# a QThread for the edit process
self.thread = QtCore.QThread()
# self.thread = QtCore.QThread()
# def entry2option(option, entry):
# self.editor_options[option] = float(entry.text())
@@ -5044,7 +5044,11 @@ class AppGerberEditor(QtCore.QObject):
pass
def clear(self):
self.thread.quit()
# try:
# self.thread.quit()
# self.thread.wait()
# except Exception as erp:
# self.app.log.error("AppGerberEditor.clear() -> %s" % str(erp))
self.active_tool = None
self.selected = []