astrodatagui: close all database connections properly before exiting
This commit is contained in:
@@ -11,6 +11,9 @@ class AstrodataGUI(QtWidgets.QMainWindow):
|
||||
classFileDir = os.path.dirname(os.path.abspath(__file__))
|
||||
absUiFilePath = os.path.join(classFileDir, "astrodatagui.ui")
|
||||
uic.loadUi(absUiFilePath, self)
|
||||
|
||||
self.actionExit.triggered.connect(self.actionExitTriggered)
|
||||
|
||||
self.show()
|
||||
|
||||
self.loadDB()
|
||||
@@ -26,3 +29,9 @@ class AstrodataGUI(QtWidgets.QMainWindow):
|
||||
def showErrorMessage(self, title: str, msg: str):
|
||||
print(title)
|
||||
print(msg)
|
||||
|
||||
def actionExitTriggered(self):
|
||||
for starDB in StarDB.getAllInstances():
|
||||
starDB.close()
|
||||
|
||||
exit()
|
||||
Reference in New Issue
Block a user