瀏覽代碼

veditlib: bugfix in connect_lines() (variable typo)
[merge from devbr6, r32640]


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

Martin Landa 16 年之前
父節點
當前提交
60fd7bd432
共有 1 個文件被更改,包括 5 次插入7 次删除
  1. 5 7
      lib/vector/vedit/break.c

+ 5 - 7
lib/vector/vedit/break.c

@@ -1,4 +1,3 @@
-
 /**
    \file vector/vedit/break.c
 
@@ -258,14 +257,14 @@ int connect_lines(struct Map_info *Map, int first, int line_from, int line_to,
 						  fx, fy, 0.0, WITHOUT_Z);
 		    dist_2 = Vect_points_distance(x1, y1, 0.0,
 						  x, y, 0.0, WITHOUT_Z);
-		    dist_3 = Vect_points_distance(x1, x1, 0.0,
+		    dist_3 = Vect_points_distance(x1, y1, 0.0,
 						  fx, fy, 0.0, WITHOUT_Z);
-
+		    
 		    if (dist_3 < dist_1 + dist_2) {
 			seg = Vect_point_on_line(Points_to, lpdist - dist_p,
 						 &fx, &fy, NULL, NULL, NULL);
 		    }
-
+		    
 		    if (seg > 0) {
 			/* lines connected -> split line_to */
 			/* update line_from */
@@ -280,9 +279,8 @@ int connect_lines(struct Map_info *Map, int first, int line_from, int line_to,
 			    Points_from->y[n_points] = fy;
 			    Points_from->z[n_points] = 0.0;
 			}
-			line_new =
-			    Vect_rewrite_line(Map, line_from, type_from,
-					      Points_from, Cats_from);
+			line_new = Vect_rewrite_line(Map, line_from, type_from,
+			 			     Points_from, Cats_from);
 			Vect_list_append(List, line_new);
 
 			/* update line_to  -- first part */