[GRASS-SVN] r56172 - grass/branches/develbranch_6/gui/wxpython/location_wizard
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu May 9 04:34:08 PDT 2013
Author: hamish
Date: 2013-05-09 04:34:08 -0700 (Thu, 09 May 2013)
New Revision: 56172
Modified:
grass/branches/develbranch_6/gui/wxpython/location_wizard/wizard.py
Log:
only check for datum transform if a datum is asked for (#1967)
Modified: grass/branches/develbranch_6/gui/wxpython/location_wizard/wizard.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/location_wizard/wizard.py 2013-05-09 07:03:49 UTC (rev 56171)
+++ grass/branches/develbranch_6/gui/wxpython/location_wizard/wizard.py 2013-05-09 11:34:08 UTC (rev 56172)
@@ -1496,39 +1496,40 @@
def OnPageChanging(self, event):
if event.GetDirection():
- # check for datum tranforms
- # FIXME: -t flag is a hack-around for trac bug #1849
- ret, out, err = RunCommand('g.proj',
- read = True, getErrorMsg = True,
- proj4 = self.customstring,
- datumtrans = '-1',
- flags = 't')
- if ret != 0:
- wx.MessageBox(parent = self,
- message = err,
- caption = _("Error"),
- style = wx.OK | wx.ICON_ERROR | wx.CENTRE)
- event.Veto()
- return
+ if self.customstring.find('+datum=') >= 0:
+ # check for datum tranforms
+ # FIXME: -t flag is a hack-around for trac bug #1849
+ ret, out, err = RunCommand('g.proj',
+ read = True, getErrorMsg = True,
+ proj4 = self.customstring,
+ datumtrans = '-1',
+ flags = 't')
+ if ret != 0:
+ wx.MessageBox(parent = self,
+ message = err,
+ caption = _("Error"),
+ style = wx.OK | wx.ICON_ERROR | wx.CENTRE)
+ event.Veto()
+ return
- if out:
- dtrans = ''
- # open a dialog to select datum transform number
- dlg = SelectTransformDialog(self.parent.parent, transforms = out)
+ if out:
+ dtrans = ''
+ # open a dialog to select datum transform number
+ dlg = SelectTransformDialog(self.parent.parent, transforms = out)
- if dlg.ShowModal() == wx.ID_OK:
- dtrans = dlg.GetTransform()
- if dtrans == '':
+ if dlg.ShowModal() == wx.ID_OK:
+ dtrans = dlg.GetTransform()
+ if dtrans == '':
+ dlg.Destroy()
+ event.Veto()
+ return _('Datum transform is required.')
+ else:
dlg.Destroy()
event.Veto()
return _('Datum transform is required.')
- else:
- dlg.Destroy()
- event.Veto()
- return _('Datum transform is required.')
- self.parent.datumtrans = dtrans
-
+ self.parent.datumtrans = dtrans
+
self.GetNext().SetPrev(self)
def GetProjstring(self, event):
More information about the grass-commit
mailing list