[GRASS-SVN] r36776 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Apr 18 08:15:16 EDT 2009


Author: martinl
Date: 2009-04-18 08:15:16 -0400 (Sat, 18 Apr 2009)
New Revision: 36776

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/location_wizard.py
Log:
Continue in r36775 (trac #554)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/location_wizard.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/location_wizard.py	2009-04-18 11:48:22 UTC (rev 36775)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/location_wizard.py	2009-04-18 12:15:16 UTC (rev 36776)
@@ -633,11 +633,12 @@
             except UnicodeDecodeError:
                 # osgeo4w problem (should be fixed)
                 pass
-        self.Populate(data)
         
         if len(data) > 0:
+            self.Populate(data)
             return data[0]
         else:
+            self.Populate(self.sourceData)
             return []
 
 class ProjTypePage(TitledPage):
@@ -1351,10 +1352,11 @@
             if not nextButton.IsEnabled():
                 nextButton.Enable(True)
         else:
+            self.epsgcode = None # not found
             if nextButton.IsEnabled():
                 nextButton.Enable(False)
             self.epsgdesc = self.epsgparams = ''
-
+        
     def OnSearch(self, event):
         value =  self.searchb.GetValue()
         if self.epsglist.GetItemCount() == 0:
@@ -1364,9 +1366,10 @@
         try:
             self.epsgcode = self.epsglist.Search(index=1, str=value)[0]
             self.tcode.SetValue(str(self.epsgcode))
-        except IndexError:
+        except IndexError: # -> no item found
             self.epsgcode = None
             self.tcode.SetValue('')
+            self.searchb.SetValue('')
 
         event.Skip()
         



More information about the grass-commit mailing list