Skip to content
Snippets Groups Projects
Unverified Commit 26493835 authored by Martyn Gigg's avatar Martyn Gigg Committed by GitHub
Browse files

Merge pull request #25607 from mantidproject/retaining_reference_to_interface_namespace

Added interface execution enviroment as class property
parents 03814462 ad7cfaec
No related branches found
No related tags found
No related merge requests found
......@@ -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']
......
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