[GRASS-SVN] r45289 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 2 09:55:23 EST 2011


Author: martinl
Date: 2011-02-02 06:55:23 -0800 (Wed, 02 Feb 2011)
New Revision: 45289

Modified:
   grass/trunk/gui/wxpython/gui_modules/wxvdigit.py
Log:
wxGUI/vdigit: fix new area


Modified: grass/trunk/gui/wxpython/gui_modules/wxvdigit.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxvdigit.py	2011-02-02 12:56:11 UTC (rev 45288)
+++ grass/trunk/gui/wxpython/gui_modules/wxvdigit.py	2011-02-02 14:55:23 UTC (rev 45289)
@@ -1385,8 +1385,9 @@
             y = c_double()
             if left > 0 and \
                     Vect_get_area_centroid(self.poMapInfo, left) == 0:
-                if Vect_get_area_points(self.poMapInfo, left, bpoints) > 0 and \
-                        Vect_find_poly_centroid(bpoints, byref(x), byref(y)) == 0:
+                # if Vect_get_area_points(self.poMapInfo, left, 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:
                     Vect_reset_line(bpoints)
                     Vect_append_point(bpoints, x.value, y.value, 0.0)
                     newline = Vect_write_line(self.poMapInfo, GV_CENTROID,
@@ -1399,8 +1400,9 @@
                     
             if right > 0 and \
                     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_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:
                     Vect_reset_line(bpoints)
                     Vect_append_point(bpoints, x.value, y.value, 0.0)
                     newline =  Vect_write_line(byref(self.poMapInfo), GV_CENTROID,



More information about the grass-commit mailing list