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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 27 15:40:30 EST 2011


Author: martinl
Date: 2011-11-27 12:40:29 -0800 (Sun, 27 Nov 2011)
New Revision: 49400

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/wxvdigit.py
Log:
wxGUI/vdigit: fix bug when digitizing areas (left X right)
	      (merge r49399 from devbr6)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/wxvdigit.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/wxvdigit.py	2011-11-27 20:33:57 UTC (rev 49399)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/wxvdigit.py	2011-11-27 20:40:29 UTC (rev 49400)
@@ -1538,6 +1538,9 @@
             left = cleft.value
             right = cright.value
             
+            Debug.msg(3, "IVDigit._addFeature(): area - left=%d right=%d",
+                      left, right)
+            
             # check if area exists and has no centroid inside
             if layer > 0 and (left > 0 or right > 0):
                 Vect_cat_set(self.poCats, layer, cat)
@@ -1564,7 +1567,7 @@
                     Vect_get_area_centroid(self.poMapInfo, right) == 0:
                 # if Vect_get_area_points(byref(self.poMapInfo), right, bpoints) > 0 and 
                 # Vect_find_poly_centroid(bpoints, byref(x), byref(y)) == 0:
-                if Vect_get_point_in_area(self.poMapInfo, left, byref(x), byref(y)) == 0:
+                if Vect_get_point_in_area(self.poMapInfo, right, byref(x), byref(y)) == 0:
                     Vect_reset_line(bpoints)
                     Vect_append_point(bpoints, x.value, y.value, 0.0)
                     newline =  Vect_write_line(self.poMapInfo, GV_CENTROID,



More information about the grass-commit mailing list