controls/CustomTable.py
changeset 1342 c17507a10807
parent 814 5743cbdff669
child 1571 486f94a8032c
--- a/controls/CustomTable.py	Wed Oct 02 19:58:32 2013 +0200
+++ b/controls/CustomTable.py	Thu Oct 03 18:59:18 2013 +0200
@@ -18,6 +18,11 @@
 import wx
 import wx.grid
 
+if wx.Platform == '__WXMSW__':
+    ROW_HEIGHT = 20
+else:
+    ROW_HEIGHT = 28
+
 class CustomTable(wx.grid.PyGridTableBase):
     
     """
@@ -124,11 +129,9 @@
             self.ResizeRow(grid, row)
     
     def ResizeRow(self, grid, row):
-        if wx.Platform == '__WXMSW__':
-            grid.SetRowMinimalHeight(row, 20)
-        else:
-            grid.SetRowMinimalHeight(row, 28)
-        grid.AutoSizeRow(row, False)
+        if grid.GetRowSize(row) < ROW_HEIGHT:
+            grid.SetRowMinimalHeight(row, ROW_HEIGHT)
+            grid.AutoSizeRow(row, False)
     
     def SetData(self, data):
         self.data = data