[GRASS-SVN] r67577 - grass/trunk/lib/vector/vedit

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 13 04:24:08 PST 2016


Author: mlennert
Date: 2016-01-13 04:24:07 -0800 (Wed, 13 Jan 2016)
New Revision: 67577

Modified:
   grass/trunk/lib/vector/vedit/break.c
Log:
vedit vector lib: forward port r58512 and r58516 (fixing #719: unexpected line with v.edit tool=break)


Modified: grass/trunk/lib/vector/vedit/break.c
===================================================================
--- grass/trunk/lib/vector/vedit/break.c	2016-01-13 09:36:29 UTC (rev 67576)
+++ grass/trunk/lib/vector/vedit/break.c	2016-01-13 12:24:07 UTC (rev 67577)
@@ -85,6 +85,7 @@
 	    G_debug(3, "Vedit_split_lines(): line=%d", line);
 
 	    /* copy first line part */
+	    Vect_reset_line(Points2);
 	    for (l = 0; l < seg; l++) {
 		Vect_append_point(Points2, x[l], y[l], z[l]);
 	    }
@@ -93,7 +94,10 @@
 	    Vect_append_point(Points2, px, py, 0.0);
 
 	    /* rewrite the line */
-	    newline = Vect_rewrite_line(Map, line, type, Points2, Cats);
+            if (j == 0)
+                newline = Vect_rewrite_line(Map, line, type, Points2, Cats);
+            else
+                newline = Vect_write_line(Map, type, Points2, Cats);
 	    if (newline < 0) {
 		return -1;
 	    }



More information about the grass-commit mailing list