[GRASS-SVN] r31027 -
grass/branches/releasebranch_6_3/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Apr 17 18:41:44 EDT 2008
Author: martinl
Date: 2008-04-17 18:41:44 -0400 (Thu, 17 Apr 2008)
New Revision: 31027
Modified:
grass/branches/releasebranch_6_3/gui/wxpython/gui_modules/location_wizard.py
Log:
wxGUI (location_wizard): FileDialog (Choose EPSG codes file) points to given path (not root directory) [backported from trunk]
Modified: grass/branches/releasebranch_6_3/gui/wxpython/gui_modules/location_wizard.py
===================================================================
--- grass/branches/releasebranch_6_3/gui/wxpython/gui_modules/location_wizard.py 2008-04-17 22:26:02 UTC (rev 31026)
+++ grass/branches/releasebranch_6_3/gui/wxpython/gui_modules/location_wizard.py 2008-04-17 22:41:44 UTC (rev 31027)
@@ -1271,11 +1271,18 @@
def OnBrowse(self, event):
"""Define path for EPSG code file"""
- dlg = wx.FileDialog(self, _("Choose EPSG codes file:"),
- "/", "", "*.*", wx.OPEN)
+ path = os.path.dirname(self.tfile.GetValue())
+ if not path:
+ path = os.getcwd()
+
+ dlg = wx.FileDialog(parent=self, message=_("Choose EPSG codes file"),
+ defaultDir=path, defaultFile="", wildcard="*", style=wx.OPEN)
+
if dlg.ShowModal() == wx.ID_OK:
path = dlg.GetPath()
self.tfile.SetValue(path)
+ self.OnBrowseCodes(None)
+
dlg.Destroy()
event.Skip()
@@ -1321,6 +1328,7 @@
wx.MessageBox(parent=self,
message=_("Unable to read EPGS codes: %s") % e,
caption=_("Error"), style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
+ self.epsglist.Populate([], update=True)
class CustomPage(TitledPage):
"""
More information about the grass-commit
mailing list