diff --git a/CHANGELOG.md b/CHANGELOG.md index 50c0aa05..80737eea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ CHANGELOG for FlatCAM beta - added an Exception when App.on_canvas_setup() fails - fixed fullscreen functionality for PyQt6 and a few other fixes regarding the port to PyQt6 - more fixes for porting to PyQt6 +- changes the exit method from exit(0) to quit() 4.08.2021 diff --git a/FlatCAM.py b/FlatCAM.py index 172a86ad..a1daa8ee 100644 --- a/FlatCAM.py +++ b/FlatCAM.py @@ -160,6 +160,7 @@ if __name__ == '__main__': fc = App(qapp=app) + # interrupt the Qt loop such that Python events have a chance to be responsive timer = QTimer() timer.timeout.connect(lambda: None) timer.start(100) diff --git a/appGUI/MainGUI.py b/appGUI/MainGUI.py index aee897f0..2bee5920 100644 --- a/appGUI/MainGUI.py +++ b/appGUI/MainGUI.py @@ -4044,7 +4044,8 @@ class MainGUI(QtWidgets.QMainWindow): try: self.final_save.emit() except SystemError: - sys.exit(0) + QtWidgets.QApplication.quit() + # sys.exit(0) event.ignore() def on_fullscreen(self, disable=False): diff --git a/app_Main.py b/app_Main.py index c30ba131..82c76b33 100644 --- a/app_Main.py +++ b/app_Main.py @@ -4018,7 +4018,8 @@ class App(QtCore.QObject): # quit app by signalling for self.kill_app() method # self.close_app_signal.emit() - sys.exit(0) + # sys.exit(0) + QtWidgets.QApplication.quit() @staticmethod def kill_app():