--- a/PLCOpenEditor.py Wed Sep 10 16:49:49 2008 +0200
+++ b/PLCOpenEditor.py Thu Sep 11 14:55:49 2008 +0200
@@ -4006,6 +4006,7 @@
self.ParentWindow.RefreshTitle()
self.ParentWindow.RefreshEditMenu()
self.ParentWindow.RefreshInstancesTree()
+ self.ParentWindow.RefreshLibraryTree()
event.Skip()
def OnClassFilter(self, event):
@@ -4047,7 +4048,6 @@
self.SaveValues()
self.RefreshValues()
self.RefreshButtons()
- self.ParentWindow.RefreshInstancesTree()
event.Skip()
def OnDeleteButton(self, event):
@@ -4056,19 +4056,16 @@
self.SaveValues()
self.RefreshValues()
self.RefreshButtons()
- self.ParentWindow.RefreshInstancesTree()
event.Skip()
def OnUpButton(self, event):
self.MoveValue(self.VariablesGrid.GetGridCursorRow(), -1)
self.RefreshButtons()
- self.ParentWindow.RefreshInstancesTree()
event.Skip()
def OnDownButton(self, event):
self.MoveValue(self.VariablesGrid.GetGridCursorRow(), 1)
self.RefreshButtons()
- self.ParentWindow.RefreshInstancesTree()
event.Skip()
def OnVariablesGridCellChange(self, event):
@@ -4106,12 +4103,12 @@
self.ParentWindow.RefreshTitle()
self.ParentWindow.RefreshEditMenu()
self.ParentWindow.RefreshInstancesTree()
+ self.ParentWindow.RefreshLibraryTree()
event.Skip()
else:
self.SaveValues()
if colname == "Class":
self.Table.ResetView(self.VariablesGrid)
- self.ParentWindow.RefreshInstancesTree()
event.Skip()
def OnVariablesGridEditorShown(self, event):
@@ -4156,6 +4153,8 @@
self.Controler.BufferProject()
self.ParentWindow.RefreshTitle()
self.ParentWindow.RefreshEditMenu()
+ self.ParentWindow.RefreshInstancesTree()
+ self.ParentWindow.RefreshLibraryTree()
event.Skip()
return VariableTypeFunction
@@ -4180,12 +4179,10 @@
new_index = max(0, min(value_index + move, len(self.Values) - 1))
if new_index != value_index:
self.Values.insert(new_index, self.Values.pop(value_index))
+ self.SaveValues()
self.RefreshValues()
self.VariablesGrid.SetGridCursor(new_index, self.VariablesGrid.GetGridCursorCol())
- else:
- self.RefreshValues()
- self.SaveValues()
-
+
def RefreshValues(self):
if len(self.Table.data) > 0:
self.VariablesGrid.SetGridCursor(0, 1)
@@ -4211,6 +4208,8 @@
self.Controler.BufferProject()
self.ParentWindow.RefreshTitle()
self.ParentWindow.RefreshEditMenu()
+ self.ParentWindow.RefreshInstancesTree()
+ self.ParentWindow.RefreshLibraryTree()
def AddVariableError(self, infos):
if isinstance(infos[0], TupleType):