Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions oqtopus/gui/database_connection_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def __init__(self, parent=None):
# Silence errors during widget initialization
pass

def close(self):
"""Close the database connection."""
self.__set_connection(None)

def getConnection(self):
"""
Returns the current database connection.
Expand Down
2 changes: 2 additions & 0 deletions oqtopus/gui/main_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def closeEvent(self, event):
)
event.ignore()
return
self.__databaseConnectionWidget.close()
self.__moduleWidget.close()
self.__moduleSelectionWidget.close()
self.__logsWidget.close()
Expand All @@ -165,6 +166,7 @@ def __closeDialog(self):
self.tr("Cannot close the dialog while an operation is running."),
)
return
self.__databaseConnectionWidget.close()
self.__moduleWidget.close()
self.__moduleSelectionWidget.close()
self.__logsWidget.close()
Expand Down
Loading