[GRASS-SVN] r32749 - in grass/branches/develbranch_6: gui/wxpython/vdigit lib/vector/vedit

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 13 15:51:39 EDT 2008


Author: martinl
Date: 2008-08-13 15:51:39 -0400 (Wed, 13 Aug 2008)
New Revision: 32749

Modified:
   grass/branches/develbranch_6/gui/wxpython/vdigit/line.cpp
   grass/branches/develbranch_6/lib/vector/vedit/snap.c
Log:
vedit: allow snapping also for points (not centroids)

Modified: grass/branches/develbranch_6/gui/wxpython/vdigit/line.cpp
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/line.cpp	2008-08-13 19:43:24 UTC (rev 32748)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/line.cpp	2008-08-13 19:51:39 UTC (rev 32749)
@@ -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/branches/develbranch_6/lib/vector/vedit/snap.c
===================================================================
--- grass/branches/develbranch_6/lib/vector/vedit/snap.c	2008-08-13 19:43:24 UTC (rev 32748)
+++ grass/branches/develbranch_6/lib/vector/vedit/snap.c	2008-08-13 19:51:39 UTC (rev 32749)
@@ -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