Adding support for not closing debug tabs and remove variable in variable debug panel if instance still exist in newly transfered program
--- a/Beremiz.py Thu Feb 16 22:52:28 2012 +0100
+++ b/Beremiz.py Thu Feb 16 22:54:44 2012 +0100
@@ -1099,7 +1099,7 @@
rolesizer = wx.BoxSizer(wx.HORIZONTAL)
leftsizer.AddSizer(rolesizer, 0, border=0, flag=wx.GROW|wx.RIGHT)
- self.GenerateEnableButton(leftwindow, rolesizer, plugin)
+ #self.GenerateEnableButton(leftwindow, rolesizer, plugin)
roletext = wx.StaticText(leftwindow, -1)
roletext.SetLabel(plugin.PlugHelp)
--- a/plugger.py Thu Feb 16 22:52:28 2012 +0100
+++ b/plugger.py Thu Feb 16 22:54:44 2012 +0100
@@ -420,16 +420,6 @@
"location": self.GetFullIEC_Channel(),
"children": children}
- def GetPlugInfos(self):
- childs = []
- # reorder childs by IEC_channels
- for child in self.IECSortedChilds():
- childs.append(child.GetPlugInfos())
- if wx.VERSION < (2, 8, 0):
- return {"name" : "%d-%s"%(self.BaseParams.getIEC_Channel(),self.BaseParams.getName()), "type" : self.BaseParams.getName(), "values" : childs}
- else:
- return {"name" : self.BaseParams.getName(), "channel" : self.BaseParams.getIEC_Channel(), "enabled" : self.BaseParams.getEnabled(), "parent" : len(self.PlugChildsTypes) > 0, "type" : self.BaseParams.getName(), "values" : childs}
-
def FindNewName(self, DesiredName):
"""
Changes Name to DesiredName if available, Name-N if not.
@@ -869,12 +859,6 @@
def GetProjectName(self):
return os.path.split(self.ProjectPath)[1]
- def GetPlugInfos(self):
- childs = []
- for child in self.IterChilds():
- childs.append(child.GetPlugInfos())
- return {"name" : "PLC (%s)"%self.GetProjectName(), "type" : None, "values" : childs}
-
def GetDefaultTargetName(self):
if wx.Platform == '__WXMSW__':
return "Win32"
@@ -1994,11 +1978,11 @@
data = builder.GetBinaryCode()
if data is not None :
if self._connector.NewPLC(MD5, data, extrafiles):
- if self.AppFrame is not None:
- self.AppFrame.CloseDebugTabs()
- self.AppFrame.RefreshInstancesTree()
self.UnsubscribeAllDebugIECVariable()
self.ProgramTransferred()
+ if self.AppFrame is not None:
+ self.AppFrame.RefreshInstancesTree()
+ self.AppFrame.CloseObsoleteDebugTabs()
self.logger.write(_("Transfer completed successfully.\n"))
else:
self.logger.write_error(_("Transfer failed\n"))