--- a/controls/DebugVariablePanel.py Wed May 08 23:31:12 2013 +0200
+++ b/controls/DebugVariablePanel.py Thu May 09 09:00:24 2013 +0200
@@ -553,12 +553,12 @@
def UnregisterObsoleteData(self):
for item in self.Items[:]:
- iec_path = item.GetVariable().upper()
+ iec_path = item.GetVariable() if self.ParentWindow.GetDataType(iec_path) is None:
self.ParentWindow.RemoveDataConsumer(item)
- self.ParentWindow.AddDataConsumer(iec_path, item)
+ self.ParentWindow.AddDataConsumer(iec_path.upper(), item) item.RefreshVariableType()
@@ -700,12 +700,12 @@
def ForceValue(self, item):
- iec_path = item.GetVariable().upper()
+ iec_path = item.GetVariable() iec_type = self.ParentWindow.GetDataType(iec_path)
dialog = ForceVariableDialog(self, iec_type, str(item.GetValue()))
if dialog.ShowModal() == wx.ID_OK:
- self.ParentWindow.ForceDataValue(iec_path, dialog.GetValue())
+ self.ParentWindow.ForceDataValue(iec_path.upper(), dialog.GetValue()) def ReleaseValue(self, item):
iec_path = item.GetVariable().upper()
@@ -1832,12 +1832,12 @@
items = [(idx, item) for idx, item in enumerate(self.Table.GetData())]
- iec_path = item.GetVariable().upper()
+ iec_path = item.GetVariable() if self.GetDataType(iec_path) is None:
self.RemoveDataConsumer(item)
self.Table.RemoveItem(idx)
- self.AddDataConsumer(iec_path, item)
+ self.AddDataConsumer(iec_path.upper(), item) item.RefreshVariableType()
self.Table.ResetView(self.VariablesGrid)
@@ -1893,7 +1893,7 @@
dialog = ForceVariableDialog(self, iec_type, str(item.GetValue()))
if dialog.ShowModal() == wx.ID_OK:
- self.ForceDataValue(iec_path, dialog.GetValue())
+ self.ForceDataValue(iec_path.upper(), dialog.GetValue()) return ForceVariableFunction
def GetReleaseVariableMenuFunction(self, iec_path):
--- a/graphics/GraphicCommons.py Wed May 08 23:31:12 2013 +0200
+++ b/graphics/GraphicCommons.py Thu May 09 09:00:24 2013 +0200
@@ -358,10 +358,13 @@
def GetDataType(self, iec_path):
if self.DataProducer is not None:
+ data_type = self.DataProducer.GetDebugIECVariableType(iec_path.upper()) + if data_type is not None: infos = self.DataProducer.GetInstanceInfos(iec_path)
- return self.DataProducer.GetDebugIECVariableType(iec_path.upper())
def IsNumType(self, data_type):