diff --git a/mantidimaging/gui/windows/live_viewer/view.py b/mantidimaging/gui/windows/live_viewer/view.py index e9c92b3aa21..54a13d6a0b9 100644 --- a/mantidimaging/gui/windows/live_viewer/view.py +++ b/mantidimaging/gui/windows/live_viewer/view.py @@ -26,7 +26,7 @@ class LiveViewerWindowView(BaseMainWindowView): imageLayout: QVBoxLayout def __init__(self, main_window: 'MainWindowView', live_dir_path: Path) -> None: - super().__init__(main_window, 'gui/ui/live_viewer_window.ui') + super().__init__(None, 'gui/ui/live_viewer_window.ui') self.setWindowTitle("Mantid Imaging - Live Viewer") self.main_window = main_window self.path = live_dir_path diff --git a/mantidimaging/gui/windows/main/view.py b/mantidimaging/gui/windows/main/view.py index 69386b15aa7..3d071b2d22d 100644 --- a/mantidimaging/gui/windows/main/view.py +++ b/mantidimaging/gui/windows/main/view.py @@ -490,6 +490,15 @@ def closeEvent(self, event): if should_close: # Pass close event to parent super().closeEvent(event) + # Close additional windows which do not have the MainWindow as parent + if self.recon: + self.recon.close() + if self.live_viewer: + self.live_viewer.close() + if self.spectrum_viewer: + self.spectrum_viewer.close() + if self.filters: + self.filters.close() else: # Ignore the close event, keeping window open diff --git a/mantidimaging/gui/windows/operations/view.py b/mantidimaging/gui/windows/operations/view.py index 2e06e11d0cb..bda6af264f1 100644 --- a/mantidimaging/gui/windows/operations/view.py +++ b/mantidimaging/gui/windows/operations/view.py @@ -59,7 +59,7 @@ class FiltersWindowView(BaseMainWindowView): filterSelector: QComboBox def __init__(self, main_window: 'MainWindowView'): - super().__init__(main_window, 'gui/ui/filters_window.ui') + super().__init__(None, 'gui/ui/filters_window.ui') self.main_window = main_window self.presenter = FiltersWindowPresenter(self, main_window) diff --git a/mantidimaging/gui/windows/recon/view.py b/mantidimaging/gui/windows/recon/view.py index 7ae88f5b5b9..038d466d04b 100644 --- a/mantidimaging/gui/windows/recon/view.py +++ b/mantidimaging/gui/windows/recon/view.py @@ -83,7 +83,7 @@ class ReconstructWindowView(BaseMainWindowView): stackSelector: DatasetSelectorWidgetView def __init__(self, main_window: 'MainWindowView'): - super().__init__(main_window, 'gui/ui/recon_window.ui') + super().__init__(None, 'gui/ui/recon_window.ui') self.main_window = main_window self.presenter = ReconstructWindowPresenter(self, main_window) diff --git a/mantidimaging/gui/windows/spectrum_viewer/view.py b/mantidimaging/gui/windows/spectrum_viewer/view.py index cc34f436dc3..d01b2383684 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/view.py +++ b/mantidimaging/gui/windows/spectrum_viewer/view.py @@ -38,7 +38,7 @@ class SpectrumViewerWindowView(BaseMainWindowView): normalise_error_issue: str = "" def __init__(self, main_window: 'MainWindowView'): - super().__init__(main_window, 'gui/ui/spectrum_viewer.ui') + super().__init__(None, 'gui/ui/spectrum_viewer.ui') self.main_window = main_window diff --git a/mantidimaging/gui/windows/wizard/view.py b/mantidimaging/gui/windows/wizard/view.py index 302ccfa2ea4..f131337667d 100644 --- a/mantidimaging/gui/windows/wizard/view.py +++ b/mantidimaging/gui/windows/wizard/view.py @@ -15,7 +15,7 @@ class WizardStage(QWidget): def __init__(self, name, parent: QWidget = None) -> None: - super().__init__(parent) + super().__init__(None) self.layout = QVBoxLayout(self) self.title_label = QLabel("Stage: " + name) @@ -34,7 +34,7 @@ def handle_stack_change(self, stack_history: Optional[dict]) -> None: class WizardStep(QWidget): def __init__(self, step: dict, wizard: WizardView, parent: QWidget = None) -> None: - super().__init__(parent) + super().__init__(None) self.wizard_view = wizard