Bug on variable panel row size in grid preventing readability of value inside cell editors fixed
authorlaurent
Wed, 30 Mar 2011 16:31:18 +0200
changeset 509 6f72513bc074
parent 508 01f49e491be5
child 510 e7327ea490b4
Bug on variable panel row size in grid preventing readability of value inside cell editors fixed
VariablePanel.py
--- a/VariablePanel.py	Wed Mar 30 15:50:16 2011 +0200
+++ b/VariablePanel.py	Wed Mar 30 16:31:18 2011 +0200
@@ -71,6 +71,7 @@
             _("   Input"): _("Input"), _("   Output"): _("Output"), _("   InOut"): _("InOut"), 
             _("   External"): _("External"), _("Variables"): _("Variables"), _("   Local"): _("Local"),
             _("   Temp"): _("Temp"), _("Global"): _("Global")}#, _("Access") : _("Access")}
+VARIABLE_CHOICES_DICT = dict([(_(_class), _class) for _class in GetFilterChoiceTransfer().iterkeys()])
 VARIABLE_CLASSES_DICT = dict([(_(_class), _class) for _class in GetFilterChoiceTransfer().itervalues()])
 
 CheckOptionForClass = {"Local": lambda x: x,
@@ -255,6 +256,11 @@
                 else:
                     grid.SetCellTextColour(row, col, wx.BLACK)
                     grid.SetCellBackgroundColour(row, col, wx.WHITE)
+            if wx.Platform == '__WXMSW__':
+                grid.SetRowMinimalHeight(row, 20)
+            else:
+                grid.SetRowMinimalHeight(row, 28)
+            grid.AutoSizeRow(row, False)
     
     def SetData(self, data):
         self.data = data
@@ -638,7 +644,7 @@
         event.Skip()
     
     def OnClassFilter(self, event):
-        self.Filter = self.FilterChoiceTransfer[self.ClassFilter.GetStringSelection()]
+        self.Filter = self.FilterChoiceTransfer[VARIABLE_CHOICES_DICT[self.ClassFilter.GetStringSelection()]]
         self.RefreshTypeList()
         self.RefreshValues()
         self.RefreshButtons()