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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Feb 4 10:02:32 EST 2011


Author: martinl
Date: 2011-02-04 07:02:32 -0800 (Fri, 04 Feb 2011)
New Revision: 45311

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/wxvdriver.py
Log:
wxGUI/vdigit: fix adding new vertex (line not found)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/wxvdriver.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/wxvdriver.py	2011-02-04 09:23:38 UTC (rev 45310)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/wxvdriver.py	2011-02-04 15:02:32 UTC (rev 45311)
@@ -565,14 +565,13 @@
         @param poMapInfo use external Map_info, None for self.poMapInfo
 
         @return dict {'line' : feature id, 'point' : point on line}
-        @return None nothing found
         """
         thisMapInfo = poMapInfo is None
         if not poMapInfo:
             poMapInfo = self.poMapInfo
         
         if not poMapInfo:
-            return None
+            return { 'line' : -1, 'point': None }
         
         if thisMapInfo:
             self._drawSelected = True
@@ -601,7 +600,7 @@
         py = c_double()
         pz = c_double()
         if not self._validLine(lineNearest):
-            return None
+            return { 'line' : -1, 'point': None }
 	ftype = Vect_read_line(poMapInfo, self.poPoints, self.poCats, lineNearest)
 	Vect_line_distance (self.poPoints, point[0], point[1], 0.0, self.is3D,
 			    byref(px), byref(py), byref(pz),



More information about the grass-commit mailing list