[GRASS-SVN] r49401 - grass/trunk/gui/wxpython/vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 27 15:42:06 EST 2011


Author: martinl
Date: 2011-11-27 12:42:06 -0800 (Sun, 27 Nov 2011)
New Revision: 49401

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


Modified: grass/trunk/gui/wxpython/vdigit/wxdigit.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/wxdigit.py	2011-11-27 20:40:29 UTC (rev 49400)
+++ grass/trunk/gui/wxpython/vdigit/wxdigit.py	2011-11-27 20:42:06 UTC (rev 49401)
@@ -1553,6 +1553,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)
@@ -1579,7 +1582,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