瀏覽代碼

veditlib: osgeo4w patch applied (by jef) - trac https://trac.osgeo.org/grass/ticket/519
(merge from devbr6, https://trac.osgeo.org/grass/changeset/36222)


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

Martin Landa 16 年之前
父節點
當前提交
afa03507a3
共有 2 個文件被更改,包括 7 次插入8 次删除
  1. 6 7
      lib/vector/vedit/select.c
  2. 1 1
      lib/vector/vedit/snap.c

+ 6 - 7
lib/vector/vedit/select.c

@@ -139,6 +139,12 @@ int select_by_query(struct Map_info *Map, int line, int type, double thresh,
 {
     int ltype;
     double length;
+    int i, cat_curr;
+    int node1, node2, node;	/* nodes */
+    int nnode1, nnode2;	/* number of line in node */
+    double nx, ny, nz;	/* node coordinates */
+    struct ilist *exclude, *found;	/* line id of nearest lines */
+    struct line_cats *Cats_curr;
 
     if (!Vect_line_alive(Map, line))
 	return -1;
@@ -172,13 +178,6 @@ int select_by_query(struct Map_info *Map, int line, int type, double thresh,
 	    return -1;
 	/* check if line is dangle */
 
-	int i, cat_curr;
-	int node1, node2, node;	/* nodes */
-	int nnode1, nnode2;	/* number of line in node */
-	double nx, ny, nz;	/* node coordinates */
-	struct ilist *exclude, *found;	/* line id of nearest lines */
-	struct line_cats *Cats_curr;
-
 	Vect_get_line_nodes(Map, line, &node1, &node2);
 
 	node = -1;

+ 1 - 1
lib/vector/vedit/snap.c

@@ -180,7 +180,7 @@ int Vedit_snap_lines(struct Map_info *Map, struct Map_info **BgMap,
 		     int to_vertex)
 {
     int i, line, type;
-    int nlines_modified;
+    int nlines_modified = 0;
 
     struct line_pnts *Points;
     struct line_cats *Cats;