diff --git a/qt/applications/workbench/workbench/app/mainwindow.py b/qt/applications/workbench/workbench/app/mainwindow.py index 3cd000dc42604efa63e8330b032f87a783c6f685..1d765ec8eaa25af8e029e1987b47736ae40ed19b 100644 --- a/qt/applications/workbench/workbench/app/mainwindow.py +++ b/qt/applications/workbench/workbench/app/mainwindow.py @@ -170,6 +170,9 @@ class MainWindow(QMainWindow): self.project = None self.project_recovery = None + # Interface Runner + self.executioner = None + def setup(self): # menus must be done first so they can be filled by the # plugins in register_plugin @@ -310,9 +313,11 @@ class MainWindow(QMainWindow): add_actions(self.view_menu, self.view_menu_actions) def launch_custom_gui(self, filename): - executioner = PythonCodeExecution() - executioner.sig_exec_error.connect(lambda errobj: logger.warning(str(errobj))) - executioner.execute(open(filename).read(), filename) + if self.executioner is None: + self.executioner = PythonCodeExecution() + self.executioner.sig_exec_error.connect(lambda errobj: logger.warning(str(errobj))) + + self.executioner.execute(open(filename).read(), filename) def populate_interfaces_menu(self): interface_dir = ConfigService['mantidqt.python_interfaces_directory']