[GRASS-SVN] r44928 - grass/branches/develbranch_6/vector/v.digit
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 10 06:12:50 EST 2011
Author: marisn
Date: 2011-01-10 03:12:49 -0800 (Mon, 10 Jan 2011)
New Revision: 44928
Modified:
grass/branches/develbranch_6/vector/v.digit/line.c
Log:
v.digit Do not create points on mouse wheel action (Fixes wrong assumption that mouses may have only 3 buttons).
Modified: grass/branches/develbranch_6/vector/v.digit/line.c
===================================================================
--- grass/branches/develbranch_6/vector/v.digit/line.c 2011-01-10 10:33:20 UTC (rev 44927)
+++ grass/branches/develbranch_6/vector/v.digit/line.c 2011-01-10 11:12:49 UTC (rev 44928)
@@ -162,8 +162,7 @@
return 1;
}
- if (nl->type & GV_POINTS) {
- /* We can get here with button = 1 or 2 -> the same write point */
+ if (nl->type & GV_POINTS && (button == 2 || button == 3)) {
snap(&x, &y);
Vect_append_point(nl->Points, x, y, 0);
@@ -186,7 +185,7 @@
}
}
if (Vect_append_point(nl->Points, x, y, 0) == -1) {
- G_warning(_("Out of memory! Point not added."));
+ G_warning("%s", _("Out of memory! Point not added."));
return 0;
}
@@ -224,7 +223,7 @@
set_mode(MOUSE_POINT);
}
}
- else { /* button = 3 -> write the line and quit */
+ else if (button == 3) { /* write the line and quit */
if (nl->Points->n_points > 1) {
/* Before the line is written, we must check if connected to existing nodes, if yes,
* such nodes must be add to update list before! the line is written (areas/isles */
More information about the grass-commit
mailing list