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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 27 15:33:57 EST 2011


Author: martinl
Date: 2011-11-27 12:33:57 -0800 (Sun, 27 Nov 2011)
New Revision: 49399

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


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/wxvdigit.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/wxvdigit.py	2011-11-27 17:07:27 UTC (rev 49398)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/wxvdigit.py	2011-11-27 20:33:57 UTC (rev 49399)
@@ -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