From d1f8e906fcfe7dec68c8177266d8c6bd680d0e9e Mon Sep 17 00:00:00 2001 From: t0mpr1c3 Date: Tue, 17 Oct 2023 02:24:32 -0400 Subject: [PATCH] add debug message when quitting --- src/main/python/ayab/ayab.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/python/ayab/ayab.py b/src/main/python/ayab/ayab.py index e70eb5b0..8d05703e 100644 --- a/src/main/python/ayab/ayab.py +++ b/src/main/python/ayab/ayab.py @@ -108,8 +108,7 @@ def __activate_ui(self): def __activate_menu(self): self.menu.ui.action_open_image_file.triggered.connect( self.scene.ayabimage.select_file) - self.menu.ui.action_quit.triggered.connect( - QCoreApplication.instance().quit) + self.menu.ui.action_quit.triggered.connect(self.__quit) self.menu.ui.action_load_AYAB_firmware.triggered.connect( self.flash.open) self.menu.ui.action_cancel.triggered.connect(self.engine.cancel) @@ -123,6 +122,11 @@ def __activate_menu(self): slot = getattr(self.scene.ayabimage, t) action.triggered.connect(slot) + def __quit(self): + logging.debug("Quitting") + QCoreApplication.instance().quit() + sys.exit() + def start_knitting(self): """Start the knitting process.""" self.start_operation()