--- a/controls/PouInstanceVariablesPanel.py Sat May 19 11:19:54 2012 +0200
+++ b/controls/PouInstanceVariablesPanel.py Sat May 19 12:40:53 2012 +0200
@@ -65,8 +65,11 @@
CT.TR_SINGLE|
CT.TR_HAS_VARIABLE_ROW_HEIGHT|
CT.TR_HIDE_ROOT|
- CT.TR_LINES_AT_ROOT|
- CT.TR_NO_LINES)
+ CT.TR_NO_LINES|
+ CT.TR_ALIGN_WINDOWS_RIGHT)
+ self.VariablesList.SetIndent(0)
+ self.VariablesList.SetSpacing(5)
+ self.VariablesList.DoSelectItem = lambda *x,**y:True
self.VariablesList.Bind(CT.EVT_TREE_ITEM_ACTIVATED,
self.OnVariablesListItemActivated)
@@ -271,7 +274,7 @@
def OnVariablesListItemActivated(self, event):
if self.InstanceChoice.GetSelection() != -1:
instance_path = self.InstanceChoice.GetStringSelection()
- selected_item = self.VariablesList.GetSelection()
+ selected_item = event.GetItem()
if selected_item is not None and selected_item.IsOk():
item_infos = self.VariablesList.GetPyData(selected_item)
if item_infos["class"] not in ITEMS_VARIABLE:
@@ -286,4 +289,4 @@
wx.CallAfter(self.ParentWindow.SelectProjectTreeItem, tagname)
event.Skip()
-
\ No newline at end of file
+