diff --git a/qt/python/mantidqt/widgets/algorithmprogress/dialog_presenter.py b/qt/python/mantidqt/widgets/algorithmprogress/dialog_presenter.py index c3398855fd57d214a4fedb7136dd5aaa7b50d8bc..8ec1f7309fd8ec4495f9d219303cb7f6697e85b1 100644 --- a/qt/python/mantidqt/widgets/algorithmprogress/dialog_presenter.py +++ b/qt/python/mantidqt/widgets/algorithmprogress/dialog_presenter.py @@ -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): """ diff --git a/qt/python/mantidqt/widgets/algorithmprogress/dialog_widget.py b/qt/python/mantidqt/widgets/algorithmprogress/dialog_widget.py index 18f98c9d38b184a984dd7e1860fddbadc663e844..fcfc7beb315d567686d4d7e0352ef822b7044252 100644 --- a/qt/python/mantidqt/widgets/algorithmprogress/dialog_widget.py +++ b/qt/python/mantidqt/widgets/algorithmprogress/dialog_widget.py @@ -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): """