Skip to content
Snippets Groups Projects
Commit d4a29ec1 authored by Dimitar Tasev's avatar Dimitar Tasev
Browse files

Address review comments, re #24445

parent 9e6dd518
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ class AlgorithmProgressDialogPresenter(AlgorithmProgressPresenterBase):
# connect the close button to the closeEvent of the window
# so that pressing the X button, and pressing `Close` go through
# the same routine, and properly call the presenter's close()
view.close_button.clicked.connect(view.closeEvent)
view.close_button.clicked.connect(view.close)
self.view = view
self.model = model
self.model.add_presenter(self)
......@@ -64,7 +64,7 @@ class AlgorithmProgressDialogPresenter(AlgorithmProgressPresenterBase):
"""
self.model.remove_presenter(self)
self.progress_bars.clear()
self.view.parent.clear_dialog()
self.view.parent().clear_dialog()
def cancel_algorithm(self, algorithm_id):
"""
......
......@@ -42,7 +42,6 @@ class AlgorithmMonitorDialog(QDialog):
def __init__(self, parent, model):
super(AlgorithmMonitorDialog, self).__init__(parent)
self.parent = parent
self.tree = QTreeWidget(self)
self.tree.setColumnCount(3)
self.tree.setSelectionMode(QTreeWidget.NoSelection)
......@@ -70,7 +69,7 @@ class AlgorithmMonitorDialog(QDialog):
self.presenter = AlgorithmProgressDialogPresenter(self, model)
self.presenter.update_gui()
def closeEvent(self, *args):
def closeEvent(self, event):
"""
Funnel the closeEvent, triggered when the user presses X,
through the same routine as the `Close` button
......@@ -79,6 +78,7 @@ class AlgorithmMonitorDialog(QDialog):
"""
self.presenter.close()
self.deleteLater()
event.accept()
def update(self, data):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment