--- a/controls/VariablePanel.py Wed May 29 00:11:27 2013 +0200
+++ b/controls/VariablePanel.py Wed May 29 11:08:00 2013 +0900
@@ -42,15 +42,15 @@
# Helpers
#-------------------------------------------------------------------------------
-def AppendMenu(parent, help, id, kind, text):
- if wx.VERSION >= (2, 6, 0):
- parent.Append(help=help, id=id, kind=kind, text=text)
- else:
- parent.Append(helpString=help, id=id, kind=kind, item=text)
-
+def AppendMenu(parent, help, id, kind, text):
+ if wx.VERSION >= (2, 6, 0):
+ parent.Append(help=help, id=id, kind=kind, text=text)
+ else:
+ parent.Append(helpString=help, id=id, kind=kind, item=text)
+
[TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU, PROJECTTREE,
POUINSTANCEVARIABLESPANEL, LIBRARYTREE, SCALING, PAGETITLES
-] = range(10)
+] = range(10)
def GetVariableTableColnames(location):
_ = lambda x : x
@@ -536,7 +536,9 @@
name = row_content["Name"]
start_idx = 0
else:
- name = ""
+ row_content = None
+ start_idx = 0
+ name = "LocalVar"
if row_content is not None and row_content["Edit"]:
row_content = self.Values[new_row - 1].copy()
@@ -716,7 +718,7 @@
if old_value != "":
self.Controler.UpdateEditedElementUsedVariable(self.TagName, old_value, value)
self.Controler.BufferProject()
- wx.CallAfter(self.ParentWindow.RefreshView, False)
+ wx.CallAfter(self.ParentWindow.RefreshView, False)
self.ParentWindow._Refresh(TITLE, FILEMENU, EDITMENU, PAGETITLES, POUINSTANCEVARIABLESPANEL, LIBRARYTREE)
else:
self.SaveValues()
@@ -860,7 +862,7 @@
self.Controler.SetPouInterfaceVars(words[1], self.Values)
if buffer:
self.Controler.BufferProject()
- self.ParentWindow._Refresh(TITLE, FILEMENU, EDITMENU, PAGETITLES, POUINSTANCEVARIABLESPANEL, LIBRARYTREE)
+ self.ParentWindow._Refresh(TITLE, FILEMENU, EDITMENU, PAGETITLES, POUINSTANCEVARIABLESPANEL, LIBRARYTREE)
#-------------------------------------------------------------------------------
# Highlights showing functions