Bug on variable panel row size in grid preventing readability of value inside cell editors fixed
--- 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()