From 7de5d5487a8744f33336eae4b38210a070043933 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 1643b5b7..3dd10700 100644 --- a/nengo_gui/page.py +++ b/nengo_gui/page.py @@ -491,6 +491,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: