--- 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.RemoveItem(item)
else:
- self.ParentWindow.AddDataConsumer(iec_path, item)
+ self.ParentWindow.AddDataConsumer(iec_path.upper(), item)
item.RefreshVariableType()
def ResetData(self):
@@ -700,12 +700,12 @@
event.Skip()
def ForceValue(self, item):
- iec_path = item.GetVariable().upper()
+ iec_path = item.GetVariable()
iec_type = self.ParentWindow.GetDataType(iec_path)
if iec_type is not None:
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())]
items.reverse()
for idx, item in items:
- iec_path = item.GetVariable().upper()
+ iec_path = item.GetVariable()
if self.GetDataType(iec_path) is None:
self.RemoveDataConsumer(item)
self.Table.RemoveItem(idx)
else:
- self.AddDataConsumer(iec_path, item)
+ self.AddDataConsumer(iec_path.upper(), item)
item.RefreshVariableType()
self.Freeze()
self.Table.ResetView(self.VariablesGrid)
@@ -1893,7 +1893,7 @@
if iec_type is not None:
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:
+ return data_type
+
infos = self.DataProducer.GetInstanceInfos(iec_path)
if infos is not None:
return infos["type"]
- return self.DataProducer.GetDebugIECVariableType(iec_path.upper())
return None
def IsNumType(self, data_type):