From 9d35556f1c1a84a8e25ca13fd33adc2681492b51 Mon Sep 17 00:00:00 2001 From: Nils <> Date: Fri, 12 Feb 2021 23:48:30 +0100 Subject: [PATCH] move quit-if into template --- qtgui/mainwindow.py | 3 --- template/qtgui/mainwindow.py | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/qtgui/mainwindow.py b/qtgui/mainwindow.py index d135228..7f08220 100644 --- a/qtgui/mainwindow.py +++ b/qtgui/mainwindow.py @@ -584,6 +584,3 @@ class MainWindow(TemplateMainWindow): #self.menu.addSeparator("menuEdit") self.menu.orderSubmenus(["menuFile", "menuEdit", "menuView", "menuHelp", "menuDebug"]) - - if not self.nsmClient.sessionName == "NOT-A-SESSION": #standalone mode - self.ui.actionQuit.setShortcut("") diff --git a/template/qtgui/mainwindow.py b/template/qtgui/mainwindow.py index 973cdec..9c4149c 100644 --- a/template/qtgui/mainwindow.py +++ b/template/qtgui/mainwindow.py @@ -145,11 +145,10 @@ class MainWindow(QtWidgets.QMainWindow): if settings.contains("showAboutDialog") and settings.value("showAboutDialog", type=bool): QtCore.QTimer.singleShot(100, self.about.show) #Qt Event loop is not ready at that point. We need to wait for the paint event. This is not to stall for time: Using the event loop guarantees that it exists elif not self.nsmClient.sessionName == "NOT-A-SESSION": #standalone mode + self.ui.actionQuit.setShortcut("") #TODO: this is a hack until we figure out how to cleanly handle hide vs quite from outside the application self.hideGUI() - - self._zoom() #enable zoom factor loaded from save file