[GRASS-SVN] r42242 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 12 10:30:01 EDT 2010


Author: martinl
Date: 2010-05-12 10:30:00 -0400 (Wed, 12 May 2010)
New Revision: 42242

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py
Log:
bugfix #1066
sort formats 
(merge r42240 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py	2010-05-12 14:26:24 UTC (rev 42241)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py	2010-05-12 14:30:00 UTC (rev 42242)
@@ -830,7 +830,7 @@
             'VTP .bt (Binary Terrain) 1.3 Format' : 'bt',
             'FARSITE v.4 Landscape File (.lcp)' : 'lcp',
             'Swedish Grid RIK (.rik)' : 'rik',
-            'USGS Optional ASCII DEM (and CDED)' : '.dem',
+            'USGS Optional ASCII DEM (and CDED)' : 'dem',
             'Northwood Numeric Grid Format .grd/.tab' : '',
             'Northwood Classified Grid Format .grc/.tab' : '',
             'ARC Digitized Raster Graphics' : 'arc',
@@ -876,6 +876,7 @@
         @param ogr    use OGR selector instead of GDAL
         """
         self.parent = parent
+        self.ogr    = ogr
         wx.Panel.__init__(self, parent = panel, id = wx.ID_ANY)
         
         self.inputBox = wx.StaticBox(parent = self, id=wx.ID_ANY,
@@ -1077,7 +1078,12 @@
         
         self.dsnText.SetLabel(self.input[self.dsnType][0])
         self.format.SetItems(self.input[self.dsnType][2])
-        self.format.SetSelection(0)
+        if sel in (self.sourceMap['file'],
+                   self.sourceMap['dir']):
+            if not self.ogr:
+                self.format.SetStringSelection('GeoTIFF')
+            else:
+                self.format.SetStringSelection('ESRI Shapefile')
         
         self.dsnSizer.Layout()
         

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py	2010-05-12 14:26:24 UTC (rev 42241)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py	2010-05-12 14:30:00 UTC (rev 42242)
@@ -688,7 +688,10 @@
             formats['protocol'].append(format)
         else:
             formats['file'].append(format)
-
+    
+    for items in formats.itervalues():
+        items.sort()
+    
     return formats
 
 formats = None



More information about the grass-commit mailing list