Fixed a bug in closing the app with the X button and selecting No on the question

This commit is contained in:
Veronica K. B. Olsen
2019-05-26 17:06:40 +02:00
parent 6c6d1ac325
commit 5c20075b73
2 changed files with 4 additions and 3 deletions
-2
View File
@@ -144,7 +144,6 @@ class GuiMainStatus(QStatusBar):
## ##
def _updateTime(self): def _updateTime(self):
sTime = time()
if self.refTime is None: if self.refTime is None:
theTime = "00:00:00" theTime = "00:00:00"
else: else:
@@ -156,7 +155,6 @@ class GuiMainStatus(QStatusBar):
tS = tS - tM*60 - tH*3600 tS = tS - tM*60 - tH*3600
theTime = "%02d:%02d:%02d" % (tH,tM,tS) theTime = "%02d:%02d:%02d" % (tH,tM,tS)
self.boxTime.setText(theTime) self.boxTime.setText(theTime)
print((time()-sTime)*1e6)
return return
# END Class GuiMainStatus # END Class GuiMainStatus
+4 -1
View File
@@ -548,7 +548,10 @@ class GuiMain(QMainWindow):
return return
def closeEvent(self, theEvent): def closeEvent(self, theEvent):
self.closeMain() if self.closeMain():
theEvent.accept()
else:
theEvent.ignore()
return return
## ##