From 45651d1c9f46276e66594db45ed0ac429b25fa95 Mon Sep 17 00:00:00 2001 From: Terry Stewart Date: Sun, 3 Jun 2018 23:54:57 -0400 Subject: [PATCH] Fixed on_start --- nengo_gui/components/sim_control.py | 2 -- nengo_gui/page.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nengo_gui/components/sim_control.py b/nengo_gui/components/sim_control.py index 4a994389..d9478990 100644 --- a/nengo_gui/components/sim_control.py +++ b/nengo_gui/components/sim_control.py @@ -197,8 +197,6 @@ def message(self, msg): elif msg == 'continue': if self.page.sim is None: self.page.rebuild = True - if 'on_start' in self.page.locals: - self.page.locals['on_start'](self.page.sim) else: if 'on_continue' in self.page.locals: self.page.locals['on_continue'](self.page.sim) diff --git a/nengo_gui/page.py b/nengo_gui/page.py index 0daf3433..7ddf340c 100644 --- a/nengo_gui/page.py +++ b/nengo_gui/page.py @@ -498,6 +498,8 @@ def build(self): if self.sim is not None: if self.settings.backend in Page.singleton_sims: Page.singleton_sims[self.settings.backend] = self + if 'on_start' in self.locals: + self.locals['on_start'](self.sim) # remove the temporary components added for visualization for c in self.components: