Ver código fonte

v.edit: fix sel_by_box()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@50281 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 anos atrás
pai
commit
38432069f7
1 arquivos alterados com 7 adições e 15 exclusões
  1. 7 15
      vector/v.edit/select.c

+ 7 - 15
vector/v.edit/select.c

@@ -344,15 +344,9 @@ int sel_by_bbox(struct Map_info *Map,
     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 @@ int sel_by_bbox(struct Map_info *Map,
     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;
 }