[GRASS-SVN] r50281 - grass/trunk/vector/v.edit
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 18 15:37:23 EST 2012
Author: martinl
Date: 2012-01-18 12:37:23 -0800 (Wed, 18 Jan 2012)
New Revision: 50281
Modified:
grass/trunk/vector/v.edit/select.c
Log:
v.edit: fix sel_by_box()
Modified: grass/trunk/vector/v.edit/select.c
===================================================================
--- grass/trunk/vector/v.edit/select.c 2012-01-18 20:20:16 UTC (rev 50280)
+++ grass/trunk/vector/v.edit/select.c 2012-01-18 20:37:23 UTC (rev 50281)
@@ -344,15 +344,9 @@
struct bound_box bbox;
struct boxlist *List_tmp;
-
- if (first_selection) {
- List_tmp = List;
- first_selection = 0;
- }
- else {
- List_tmp = Vect_new_boxlist(0);
- }
-
+
+ List_tmp = Vect_new_boxlist(0);
+
/* bounding box */
bbox.N = y1 < y2 ? y2 : y1;
bbox.S = y1 < y2 ? y1 : y2;
@@ -360,17 +354,15 @@
bbox.E = x1 < x2 ? x2 : x1;
bbox.T = PORT_DOUBLE_MAX;
bbox.B = -PORT_DOUBLE_MAX;
-
+
Vect_select_lines_by_box(Map, &bbox, type, List_tmp);
G_debug(1, " %d lines selected (by bbox)", List_tmp->n_values);
/* merge lists (only duplicate items) */
- if (List_tmp != List) {
- merge_lists2(List, List_tmp);
- Vect_destroy_boxlist(List_tmp);
- }
-
+ merge_lists2(List, List_tmp);
+ Vect_destroy_boxlist(List_tmp);
+
return List->n_values;
}
More information about the grass-commit
mailing list