# HG changeset patch # User laurent # Date 1333381007 -7200 # Node ID 5a036ae4d6aa848e1062c07235528191f107f4c6 # Parent d76f73c7ae5eff414aee3435b83e51b7606a5f69 Fix bug when creating new projects diff -r d76f73c7ae5e -r 5a036ae4d6aa Beremiz.py --- a/Beremiz.py Sat Mar 31 15:20:04 2012 +0200 +++ b/Beremiz.py Mon Apr 02 17:36:47 2012 +0200 @@ -1634,10 +1634,11 @@ self.Config.Write("lastopenedfolder", os.path.dirname(projectpath)) self.Config.Flush() self.ResetView() - self.PluginRoot = PluginsRoot(self, self.Log) - self.Controler = self.PluginRoot - result = self.PluginRoot.NewProject(projectpath) + plugin_root = PluginsRoot(self, self.Log) + result = plugin_root.NewProject(projectpath) if not result: + self.PluginRoot = plugin_root + self.Controler = self.PluginRoot self.RefreshConfigRecentProjects(projectpath) if self.EnableDebug: self.DebugVariablePanel.SetDataProducer(self.PluginRoot)