- 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:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user