[GRASS-SVN] r39356 -
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 30 13:43:40 EDT 2009
Author: cmbarton
Date: 2009-09-30 13:43:40 -0400 (Wed, 30 Sep 2009)
New Revision: 39356
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/location_wizard.py
Log:
Backport from develbranch_6 r39311. If location created in GISDbase that is not the current one, the user is not offered the chance to set region extents (because this can't be done and would generate an error).
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-09-30 17:42:01 UTC (rev 39355)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/location_wizard.py 2009-09-30 17:43:40 UTC (rev 39356)
@@ -1739,6 +1739,9 @@
# new location created?
self.location = None
success = False
+
+ # location created in different GIS database?
+ self.altdb = False
#
# run wizard...
@@ -1748,19 +1751,21 @@
if success == True:
self.wizard.Destroy()
self.location = self.startpage.location
- dlg = wx.MessageDialog(parent=self.parent,
- message=_("Do you want to set the default "
- "region extents and resolution now?"),
- caption=_("Location <%s> created") % self.location,
- style=wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION)
- dlg.CenterOnScreen()
- if dlg.ShowModal() == wx.ID_YES:
- dlg.Destroy()
- defineRegion = RegionDef(self.parent, location=self.location)
- defineRegion.CenterOnScreen()
- defineRegion.Show()
- else:
- dlg.Destroy()
+
+ if self.altdb == False:
+ dlg = wx.MessageDialog(parent=self.parent,
+ message=_("Do you want to set the default "
+ "region extents and resolution now?"),
+ caption=_("Location <%s> created") % self.location,
+ style=wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION)
+ dlg.CenterOnScreen()
+ if dlg.ShowModal() == wx.ID_YES:
+ dlg.Destroy()
+ defineRegion = RegionDef(self.parent, location=self.location)
+ defineRegion.CenterOnScreen()
+ defineRegion.Show()
+ else:
+ dlg.Destroy()
elif success == False:
self.wizard.Destroy()
@@ -1893,6 +1898,8 @@
{ 'loc' : location, 'dir' : database},
caption=_("New GIS data directory"),
style=wx.OK | wx.ICON_INFORMATION | wx.CENTRE)
+ # location created in alternate GISDbase
+ self.altdb = True
if coordsys == "xy":
success = self.XYCreate()
More information about the grass-commit
mailing list