Skip to content

Commit

Permalink
disconnect mainwindow_signal_logout_mscolab on the window closeEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
ReimarBauer committed Apr 7, 2024
1 parent ac259ba commit cf5a934
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions mslib/msui/topview.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,6 @@ def __init__(self, parent=None, mainwindow=None, model=None, _id=None,
self.mainwindow_signal_permission_revoked = mainwindow.signal_permission_revoked
self.mainwindow_signal_render_new_permission = mainwindow.signal_render_new_permission
self.mainwindow_signal_activate_flighttrack = mainwindow.signal_activate_flighttrack
self.mainwindow_signal_activate_operation = mainwindow.signal_activate_operation
self.mainwindow_signal_login_mscolab = mainwindow.signal_login_mscolab
self.mainwindow_signal_logout_mscolab = mainwindow.signal_logout_mscolab
self.mainwindow_listFlightTracks = mainwindow.listFlightTracks
self.mainwindow_filterCategoryCb = mainwindow.filterCategoryCb
self.mainwindow_listOperationsMSC = mainwindow.listOperationsMSC
Expand Down
5 changes: 5 additions & 0 deletions mslib/msui/viewwindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def closeEvent(self, event):
Overloads QtGui.QMainWindow.closeEvent(). This method is called if
Qt receives a window close request for our application window.
"""
if self.mainwindow_signal_logout_mscolab is not None:
# we need to disconnect the mainwindow_signal_logout when the topview is closed
# the next topview will connect one again
self.mainwindow_signal_logout_mscolab.disconnect()

if self.force_close:
ret = QtWidgets.QMessageBox.Yes
else:
Expand Down

0 comments on commit cf5a934

Please sign in to comment.