Преглед на файлове

wxGUI: set min column width fot ItemList
(merge https://trac.osgeo.org/grass/changeset/40530 from devbr6)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40531 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa преди 15 години
родител
ревизия
4f95243b93
променени са 1 файла, в които са добавени 6 реда и са изтрити 7 реда
  1. 6 7
      gui/wxpython/gui_modules/location_wizard.py

+ 6 - 7
gui/wxpython/gui_modules/location_wizard.py

@@ -494,13 +494,12 @@ class ItemList(wx.ListCtrl,
 
         if self.sourceData:
             self.Populate()
-            #FIXME: auto sizing doesn't work for some reason
-            for i in range(self.GetColumnCount()):
-                self.SetColumnWidth(i, wx.LIST_AUTOSIZE)
-        else:
-            for i in range(self.GetColumnCount()):
-                self.SetColumnWidth(i, wx.LIST_AUTOSIZE_USEHEADER)
-
+        
+        for i in range(self.GetColumnCount()):
+            self.SetColumnWidth(i, wx.LIST_AUTOSIZE_USEHEADER)
+            if self.GetColumnWidth(i) < 80:
+                self.SetColumnWidth(i, 80)
+        
         #
         # listmix
         #