From ef9bbcaa69252488bc4ab4d12f6fc28c43e47368 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 29 Jul 2017 20:36:38 +0800 Subject: [PATCH] browser,dashboard: delete MDI subwindows when they are closed --- artiq/browser/experiments.py | 1 + artiq/dashboard/experiments.py | 1 + 2 files changed, 2 insertions(+) diff --git a/artiq/browser/experiments.py b/artiq/browser/experiments.py index d9abea153..64011f6a7 100644 --- a/artiq/browser/experiments.py +++ b/artiq/browser/experiments.py @@ -504,6 +504,7 @@ class ExperimentsArea(QtWidgets.QMdiArea): exc_info=True) dock = _ExperimentDock(self, expurl, {}) asyncio.ensure_future(dock._recompute_arguments()) + dock.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.addSubWindow(dock) dock.show() dock.sigClosed.connect(partial(self.on_dock_closed, dock)) diff --git a/artiq/dashboard/experiments.py b/artiq/dashboard/experiments.py index 7172700ce..642e28dd6 100644 --- a/artiq/dashboard/experiments.py +++ b/artiq/dashboard/experiments.py @@ -558,6 +558,7 @@ class ExperimentManager: del self.submission_arguments[expurl] dock = _ExperimentDock(self, expurl) self.open_experiments[expurl] = dock + dock.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.main_window.centralWidget().addSubWindow(dock) dock.show() dock.sigClosed.connect(partial(self.on_dock_closed, expurl))