From d96d981643f125456e80c85f6a5065e46b879372 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Tue, 4 Jul 2023 00:12:36 +0300 Subject: [PATCH] - fixed a number of bugs reported in the issue #32 here: https://bitbucket.org/marius_stanciu/flatcam_beta/issues/32/crashes-on-close-random-crashes-that --- CHANGELOG.md | 4 ++++ appGUI/MainGUI.py | 2 +- appMain.py | 19 ++++++++++--------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23d9e043..6e6143b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ CHANGELOG for FlatCAM Evo beta ================================================= +4.07.2023 + +- fixed a number of bugs reported in the issue #32 here: https://bitbucket.org/marius_stanciu/flatcam_beta/issues/32/crashes-on-close-random-crashes-that + 1.07.2023 - NCC Plugin: fixed the determination of optimal tool diff --git a/appGUI/MainGUI.py b/appGUI/MainGUI.py index 32f66141..423b3175 100644 --- a/appGUI/MainGUI.py +++ b/appGUI/MainGUI.py @@ -2070,7 +2070,7 @@ class MainGUI(QtWidgets.QMainWindow): tb_lock_state = qsettings.value('toolbar_lock', "true") show_text_state = qsettings.value('menu_show_text', "true") win_geo = qsettings.value('window_geometry', (100, 100, 800, 400)) - splitter_left = qsettings.value('splitter_left', 1) + splitter_left = int(qsettings.value('splitter_left', 1)) if qsettings.contains("layout"): layout = qsettings.value('layout', type=str) diff --git a/appMain.py b/appMain.py index 7e6a1d4f..3aa43021 100644 --- a/appMain.py +++ b/appMain.py @@ -3810,11 +3810,12 @@ class App(QtCore.QObject): # hide the UI so the user experiments a faster shutdown self.ui.hide() - self.new_launch.stop.emit() # noqa - # https://forum.qt.io/topic/108777/stop-a-loop-in-object-that-has-been-moved-to-a-qthread/7 - if self.listen_th.isRunning(): - self.listen_th.requestInterruption() - self.log.debug("ArgThread QThread requested an interruption.") + if sys.platform == 'win32': + self.new_launch.stop.emit() # noqa + # https://forum.qt.io/topic/108777/stop-a-loop-in-object-that-has-been-moved-to-a-qthread/7 + if self.listen_th.isRunning(): + self.listen_th.requestInterruption() + self.log.debug("ArgThread QThread requested an interruption.") # close editors before quiting the app, if they are open if self.call_source == 'geo_editor': @@ -3829,7 +3830,7 @@ class App(QtCore.QObject): if self.call_source == 'exc_editor': self.exc_editor.deactivate() try: - self.grb_editor.disconnect() + self.exc_editor.disconnect() except TypeError: pass if silent is False: @@ -3838,11 +3839,11 @@ class App(QtCore.QObject): if self.call_source == 'grb_editor': self.grb_editor.deactivate_grb_editor() try: - self.exc_editor.disconnect() + self.grb_editor.disconnect() except TypeError: pass - if silent is False: - self.log.debug("App.quit_application() --> Gerber Editor deactivated.") + if silent is False: + self.log.debug("App.quit_application() --> Gerber Editor deactivated.") # disconnect the mouse events if self.use_3d_engine: