--- a/controls/PouInstanceVariablesPanel.py Mon Jun 03 11:52:13 2013 +0200
+++ b/controls/PouInstanceVariablesPanel.py Mon Jun 03 17:29:03 2013 +0200
@@ -174,6 +174,7 @@
bitmap=GetBitmap("debug_instance"),
size=wx.Size(28, 28), style=wx.NO_BORDER)
self.Bind(wx.EVT_BUTTON, self.GenDebugButtonCallback(var_infos), debug_button)
+ debug_button.Bind(wx.EVT_RIGHT_UP, self.GenDebugButtonRightClickCallback(var_infos))
buttons.append(debug_button)
button_num = len(buttons)
@@ -279,6 +280,18 @@
event.Skip()
return DebugButtonCallback
+ def GenDebugButtonRightClickCallback(self, infos):
+ def DebugButtonCallback(event):
+ if self.InstanceChoice.GetSelection() != -1:
+ if infos["class"] in ITEMS_VARIABLE:
+ self.ParentWindow.AddDebugVariable(
+ "%s.%s" % (self.InstanceChoice.GetStringSelection(),
+ infos["name"]),
+ force=True,
+ graph=True)
+ event.Skip()
+ return DebugButtonCallback
+
def GenGraphButtonCallback(self, infos):
def GraphButtonCallback(event):
if self.InstanceChoice.GetSelection() != -1: