[GRASS-SVN] r33197 - grass/branches/develbranch_6/gui/wxpython/vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Sep 1 12:45:07 EDT 2008


Author: martinl
Date: 2008-09-01 12:45:04 -0400 (Mon, 01 Sep 2008)
New Revision: 33197

Modified:
   grass/branches/develbranch_6/gui/wxpython/vdigit/driver_select.cpp
Log:
wxGUI/vdigit: bug fix in GetRegionSelected()"


Modified: grass/branches/develbranch_6/gui/wxpython/vdigit/driver_select.cpp
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/driver_select.cpp	2008-09-01 16:10:39 UTC (rev 33196)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/driver_select.cpp	2008-09-01 16:45:04 UTC (rev 33197)
@@ -437,7 +437,7 @@
 	*/
 	int type;
 	bool found;
-	for (int line = 1; line < Vect_get_num_lines(mapInfo); line++) {
+	for (int line = 1; line <= Vect_get_num_lines(mapInfo); line++) {
 	    type = Vect_read_line (mapInfo, NULL, cats, line);
 	    if (!(type & (GV_POINTS | GV_LINES)))
 		continue;
@@ -461,7 +461,7 @@
 	line = list->value[i];
 	area = Vect_get_centroid_area(mapInfo, line);
 
-	if (area > 0) {
+	if (area > 0 && area < Vect_get_num_areas(mapInfo)) {
 	    if (!Vect_get_area_box(mapInfo, area, &line_box))
 		continue;
 	}



More information about the grass-commit mailing list