[GRASS-SVN] r32751 - in grass/trunk: gui/wxpython/vdigit lib/vector/vedit

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 13 15:57:01 EDT 2008


Author: martinl
Date: 2008-08-13 15:57:01 -0400 (Wed, 13 Aug 2008)
New Revision: 32751

Modified:
   grass/trunk/gui/wxpython/vdigit/line.cpp
   grass/trunk/lib/vector/vedit/snap.c
Log:
vedit: allow snapping also for points (not centroids)
(merge from devbr6, r32749)


Modified: grass/trunk/gui/wxpython/vdigit/line.cpp
===================================================================
--- grass/trunk/gui/wxpython/vdigit/line.cpp	2008-08-13 19:52:37 UTC (rev 32750)
+++ grass/trunk/gui/wxpython/vdigit/line.cpp	2008-08-13 19:57:01 UTC (rev 32751)
@@ -62,7 +62,7 @@
 	    (int) npoints, layer, cat, snap);
 
     /* TODO: 3D */
-    if (!(type & GV_POINTS) && !(type & GV_LINES)) {
+    if (!(type & (GV_POINTS | GV_LINES))) {
 	return -1;
     }
 
@@ -113,7 +113,7 @@
 	}
     }
 
-    if (snap != NO_SNAP && (type & GV_LINES)) { /* apply snapping (node or vertex) */
+    if (snap != NO_SNAP && (type & (GV_POINT | GV_LINES))) { /* apply snapping (node or vertex) */
 	Vedit_snap_line(display->mapInfo, BgMap, nbgmaps,
 			-1, Points,
 			threshold, (snap == SNAP) ? 0 : 1); 

Modified: grass/trunk/lib/vector/vedit/snap.c
===================================================================
--- grass/trunk/lib/vector/vedit/snap.c	2008-08-13 19:52:37 UTC (rev 32750)
+++ grass/trunk/lib/vector/vedit/snap.c	2008-08-13 19:57:01 UTC (rev 32751)
@@ -192,7 +192,7 @@
 	line = List->value[i];
 	type = Vect_read_line(Map, Points, Cats, line);
 
-	if (!(type & GV_LINES)) {
+	if (!(type & (GV_POINT | GV_LINES))) {
 	    continue;
 	}
 



More information about the grass-commit mailing list