[GRASS-SVN] r48169 - grass/trunk/vector/v.edit
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 6 12:23:41 EDT 2011
Author: martinl
Date: 2011-09-06 09:23:41 -0700 (Tue, 06 Sep 2011)
New Revision: 48169
Modified:
grass/trunk/vector/v.edit/main.c
Log:
v.edit: check value of threshold for snapping
Modified: grass/trunk/vector/v.edit/main.c
===================================================================
--- grass/trunk/vector/v.edit/main.c 2011-09-06 15:48:55 UTC (rev 48168)
+++ grass/trunk/vector/v.edit/main.c 2011-09-06 16:23:41 UTC (rev 48169)
@@ -5,8 +5,7 @@
*
* PURPOSE: Editing vector map.
*
- * AUTHOR(S): GRASS Development Team
- * Wolf Bergenheim
+ * AUTHOR(S): Wolf Bergenheim
* Jachym Cepicky
* Update for GRASS 7 by Martin Landa <landa.martin gmail.com>
*
@@ -186,7 +185,11 @@
snap = SNAP;
else if (strcmp(params.snap->answer, "vertex") == 0)
snap = SNAPVERTEX;
-
+ if (snap != NO_SNAP && thresh[THRESH_SNAP] <= 0) {
+ G_warning(_("Threshold for snapping must be > 0. No snapping applied."));
+ snap = NO_SNAP;
+ }
+
if (action_mode != MODE_CREATE && action_mode != MODE_ADD) {
/* select lines */
List = Vect_new_list();
More information about the grass-commit
mailing list