*** empty log message ***
authoretisserant
Fri, 20 Jul 2007 19:10:00 +0200
changeset 49 1762276019fb
parent 48 2675bf9b0a01
child 50 4610aafc884e
*** empty log message ***
PLCOpenEditor.py
--- a/PLCOpenEditor.py	Fri Jul 20 18:59:46 2007 +0200
+++ b/PLCOpenEditor.py	Fri Jul 20 19:10:00 2007 +0200
@@ -1900,7 +1900,7 @@
     def GetValue(self, row, col):
         if row < self.GetNumberRows():
             if col == 0:
-                return "d"
+                return self.Parent.Values.index(self.data[row]) + 1
             name = str(self.data[row].get(self.GetColLabelValue(col), ""))
             return name
     
@@ -1967,7 +1967,7 @@
                 renderer = None
                 colname = self.GetColLabelValue(col)
                 grid.SetReadOnly(row, col, False)
-                if colname == "Drag":
+                if col == 0:
                     grid.SetReadOnly(row, col, True)
                 elif colname == "Name":
                     if self.Parent.PouIsUsed and self.GetValueByName(row, "Class") in ["Input", "Output", "InOut"]:
@@ -2237,7 +2237,7 @@
             self.DefaultTypes = {"All" : "Local", "Interface" : "Input", "Variables" : "Local"}
             self.DefaultValue = {"Name" : "", "Class" : "", "Type" : "INT", "Location" : "", "Initial Value" : "", "Retain" : "No", "Constant" : "No"}
         if pou_type in ["config", "resource"] or pou_type == "program":
-            self.Table = VariableTable(self, [], ["Drag", "Name", "Class", "Type", "Location", "Initial Value", "Retain", "Constant"])
+            self.Table = VariableTable(self, [], ["#", "Name", "Class", "Type", "Location", "Initial Value", "Retain", "Constant"])
             if pou_type not in ["config", "resource"]:
                 self.FilterChoices = ["All","Interface","   Input","   Output","   InOut","   External","Variables","   Local","   Temp","Global","Access"]
             else:
@@ -2245,7 +2245,7 @@
             self.ColSizes = [40, 80, 70, 80, 80, 80, 60, 70]
             self.ColAlignements = [wxALIGN_CENTER, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_CENTER, wxALIGN_CENTER]
         else:
-            self.Table = VariableTable(self, [], ["Drag", "Name", "Class", "Type", "Initial Value", "Retain", "Constant"])
+            self.Table = VariableTable(self, [], ["#", "Name", "Class", "Type", "Initial Value", "Retain", "Constant"])
             self.FilterChoices = ["All","Interface","   Input","   Output","   InOut","   External","Variables","   Local","   Temp"]
             self.ColSizes = [40, 120, 70, 80, 120, 60, 70]
             self.ColAlignements = [wxALIGN_CENTER, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_CENTER, wxALIGN_CENTER]