Browse Source

adjusted progress report

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@44460 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 14 years ago
parent
commit
30e8d57184
1 changed files with 3 additions and 3 deletions
  1. 3 3
      lib/vector/Vlib/remove_areas.c

+ 3 - 3
lib/vector/Vlib/remove_areas.c

@@ -50,12 +50,11 @@ Vect_remove_small_areas(struct Map_info *Map, double thresh,
     Cats = Vect_new_cats_struct();
 
     nareas = Vect_get_num_areas(Map);
-    for (area = 1; area <= Vect_get_num_areas(Map); area++) {
+    for (area = 1; area <= nareas; area++) {
 	int i, j, centroid, dissolve_neighbour;
 	double length, size;
 
-	if (area <= nareas)
-	    G_percent(area, nareas, 1);
+	G_percent(area, nareas, 1);
 	G_debug(3, "area = %d", area);
 	if (!Vect_area_alive(Map, area))
 	    continue;
@@ -170,6 +169,7 @@ Vect_remove_small_areas(struct Map_info *Map, double thresh,
 	}
 
 	nremoved++;
+	nareas = Vect_get_num_areas(Map);
     }
 
     if (removed_area)