beremiz

898648a09e13
Parents e3adb9f63171
Children 28afed8b1af5
One issue on SetDataProducer not handled fixed
  • +10 -5
    Beremiz.py
  • --- a/Beremiz.py Wed Dec 09 16:46:59 2009 +0100
    +++ b/Beremiz.py Wed Dec 09 16:51:22 2009 +0100
    @@ -409,7 +409,6 @@
    self.Controler = self.PluginRoot
    result = self.PluginRoot.LoadProject(projectOpen, buildpath)
    if not result:
    - self.DebugVariablePanel.SetDataProducer(self.PluginRoot)
    self._Refresh(TYPESTREE, INSTANCESTREE, LIBRARYTREE)
    self.RefreshAll()
    else:
    @@ -421,6 +420,9 @@
    if plugin_root is not None:
    self._Refresh(TYPESTREE, INSTANCESTREE, LIBRARYTREE)
    self.RefreshAll()
    + if self.EnableDebug:
    + self.DebugVariablePanel.SetDataProducer(self.PluginRoot)
    +
    # Add beremiz's icon in top left corner of the frame
    self.SetIcon(wx.Icon(Bpath( "images", "brz.ico"), wx.BITMAP_TYPE_ICO))
    @@ -516,8 +518,8 @@
    def OnCloseFrame(self, event):
    if self.PluginRoot is None or self.CheckSaveBeforeClosing(_("Close Application")):
    + self.PluginRoot.KillDebugThread()
    self.KillLocalRuntime()
    - self.PluginRoot.KillDebugThread()
    event.Skip()
    else:
    event.Veto()
    @@ -1321,7 +1323,8 @@
    self.PluginRoot.CloseProject()
    self.PluginRoot = None
    self.Log.flush()
    - self.DebugVariablePanel.SetDataProducer(None)
    + if self.EnableDebug:
    + self.DebugVariablePanel.SetDataProducer(None)
    def OnNewProjectMenu(self, event):
    if self.PluginRoot is not None and not self.CheckSaveBeforeClosing():
    @@ -1343,7 +1346,8 @@
    self.Controler = self.PluginRoot
    result = self.PluginRoot.NewProject(projectpath)
    if not result:
    - self.DebugVariablePanel.SetDataProducer(self.PluginRoot)
    + if self.EnableDebug:
    + self.DebugVariablePanel.SetDataProducer(self.PluginRoot)
    self._Refresh(TYPESTREE, INSTANCESTREE, LIBRARYTREE)
    self.RefreshAll()
    else:
    @@ -1371,7 +1375,8 @@
    self.Controler = self.PluginRoot
    result = self.PluginRoot.LoadProject(projectpath)
    if not result:
    - self.DebugVariablePanel.SetDataProducer(self.PluginRoot)
    + if self.EnableDebug:
    + self.DebugVariablePanel.SetDataProducer(self.PluginRoot)
    self._Refresh(TYPESTREE, INSTANCESTREE, LIBRARYTREE)
    self.RefreshAll()
    else: