- fix to work with Python 3.8 (closing the application)

This commit is contained in:
Marius Stanciu 2020-04-05 16:53:10 +03:00 committed by Marius
parent b53c1c403a
commit 836122ca24
2 changed files with 6 additions and 4 deletions

View File

@ -5280,7 +5280,7 @@ class App(QtCore.QObject):
:return: None
"""
self.save_defaults(silent=True)
log.debug("App.final_save() --> App Defaults saved.")
log.debug("App.quit_application() --> App Defaults saved.")
if self.cmd_line_headless != 1:
# save app state to file
@ -5312,13 +5312,13 @@ class App(QtCore.QObject):
# This will write the setting to the platform specific storage.
del stgs
log.debug("App.final_save() --> App UI state saved.")
log.debug("App.quit_application() --> App UI state saved.")
# try to quit the QThread that run ArgsThread class
try:
self.th.quit()
except Exception as e:
log.debug("App.final_save() --> %s" % str(e))
log.debug("App.quit_application() --> %s" % str(e))
# try to quit the Socket opened by ArgsThread class
try:
@ -5332,7 +5332,8 @@ class App(QtCore.QObject):
QtWidgets.qApp.quit()
# When the main event loop is not started yet in which case the qApp.quit() will do nothing
# we use the following command
sys.exit(0)
# sys.exit(0)
os._exit(0) # fix to work with Python 3.8
def kill_app(self):
# QtCore.QCoreApplication.quit()

View File

@ -15,6 +15,7 @@ CAD program, and create G-Code for Isolation routing.
- made sure that when saving a project, the app will try to update the active object from UI form only if there is an active object
- fix for contextual menus on canvas when using PyQt versions > 5.12.1
- decision on which mouse button to use for panning is done now once when setting the plotcanvas
- fix to work with Python 3.8 (closing the application)
4.04.2020