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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Sep 1 12:47:44 EDT 2008


Author: martinl
Date: 2008-09-01 12:47:44 -0400 (Mon, 01 Sep 2008)
New Revision: 33198

Modified:
   grass/branches/develbranch_6/gui/wxpython/vdigit/driver_select.cpp
Log:
wxGUI/vdigit: update r33197


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:45:04 UTC (rev 33197)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/driver_select.cpp	2008-09-01 16:47:44 UTC (rev 33198)
@@ -415,7 +415,7 @@
 */
 std::vector<int> DisplayDriver::GetRegionSelected()
 {
-    int line, area;
+    int line, area, nareas;
     
     std::vector<int> region;
 
@@ -457,11 +457,12 @@
 	list = selected.values;
     }
 
+    nareas = Vect_get_num_areas(mapInfo);
     for (int i = 0; i < list->n_values; i++) {
 	line = list->value[i];
 	area = Vect_get_centroid_area(mapInfo, line);
 
-	if (area > 0 && area < Vect_get_num_areas(mapInfo)) {
+	if (area > 0 && area <= nareas) {
 	    if (!Vect_get_area_box(mapInfo, area, &line_box))
 		continue;
 	}



More information about the grass-commit mailing list