Fixed bug when indexing table in Pragma within ST/IL code
authorLaurent Bessard
Thu, 06 Dec 2012 16:10:26 +0100
changeset 894 a4919f228924
parent 893 f528c421637b
child 895 f5a28011d551
Fixed bug when indexing table in Pragma within ST/IL code
controls/VariablePanel.py
editors/TextViewer.py
--- a/controls/VariablePanel.py	Wed Dec 05 15:32:02 2012 +0100
+++ b/controls/VariablePanel.py	Thu Dec 06 16:10:26 2012 +0100
@@ -781,7 +781,6 @@
     def OnVariablesGridCellLeftClick(self, event):
         row = event.GetRow()
         if not self.Debug and (event.GetCol() == 0 and self.Table.GetValueByName(row, "Edit")):
-            row = event.GetRow()
             var_name = self.Table.GetValueByName(row, "Name")
             var_class = self.Table.GetValueByName(row, "Class")
             var_type = self.Table.GetValueByName(row, "Type")
--- a/editors/TextViewer.py	Wed Dec 05 15:32:02 2012 +0100
+++ b/editors/TextViewer.py	Thu Dec 06 16:10:26 2012 +0100
@@ -694,7 +694,7 @@
                                             "extensible": False}
                         current_context = self.Variables
                     else:
-                        if char == '[':
+                        if char == '[' and current_context is not None:
                             self.ContextStack.append(current_context.get(word, None))
                         current_context = self.Variables