Parcourir la source

Vlib: bugfix in Vect_find_line_list() -- don't check cur_dist
(merge from devbr6, https://trac.osgeo.org/grass/changeset/32892)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32893 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa il y a 16 ans
Parent
commit
484c0508fc
1 fichiers modifiés avec 5 ajouts et 4 suppressions
  1. 5 4
      lib/vector/Vlib/find.c

+ 5 - 4
lib/vector/Vlib/find.c

@@ -209,11 +209,12 @@ Vect_find_line_list(struct Map_info *map,
 	Vect_line_distance(Points, ux, uy, uz, with_z, NULL, NULL, NULL,
 			   &new_dist, NULL, NULL);
 	G_debug(3, " line = %d distance = %f", line, new_dist);
-	if ((++gotone == 1) || (new_dist <= cur_dist)) {
-	    if (found) {
-		Vect_list_append(found, line);
-	    }
 
+	if (found && new_dist <= maxdist) {
+	    Vect_list_append(found, line);
+	}
+
+	if ((++gotone == 1) || (new_dist <= cur_dist)) {
 	    if (new_dist == cur_dist) {
 		/* TODO */
 		/* choice = dig_center_check (map->Line, choice, a, ux, uy); */