controls/VariablePanel.py
changeset 738 1ccd08cfae0c
parent 731 4e30c1c0922d
child 747 f36838792511
--- a/controls/VariablePanel.py	Wed Aug 01 12:44:51 2012 +0200
+++ b/controls/VariablePanel.py	Fri Aug 10 00:32:05 2012 +0200
@@ -819,8 +819,20 @@
         if isinstance(infos[0], TupleType):
             for i in xrange(*infos[0]):
                 self.Table.AddHighlight((i,) + infos[1:], highlight_type)
+            cell_visible = infos[0][0]
         else:
             self.Table.AddHighlight(infos, highlight_type)
+            cell_visible = infos[0]
+        colnames = [colname.lower() for colname in self.Table.colnames]
+        self.VariablesGrid.MakeCellVisible(cell_visible, colnames.index(infos[1]))
+        self.RefreshHighlightsTimer.Start(int(REFRESH_HIGHLIGHT_PERIOD * 1000), oneShot=True)
+
+    def RemoveVariableHighlight(self, infos, highlight_type):
+        if isinstance(infos[0], TupleType):
+            for i in xrange(*infos[0]):
+                self.Table.RemoveHighlight((i,) + infos[1:], highlight_type)
+        else:
+            self.Table.RemoveHighlight(infos, highlight_type)
         self.RefreshHighlightsTimer.Start(int(REFRESH_HIGHLIGHT_PERIOD * 1000), oneShot=True)
 
     def ClearHighlights(self, highlight_type=None):