[GRASS-SVN] r45227 - grass/branches/releasebranch_6_4/vector/v.digit

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 28 05:38:44 EST 2011


Author: marisn
Date: 2011-01-28 02:38:44 -0800 (Fri, 28 Jan 2011)
New Revision: 45227

Modified:
   grass/branches/releasebranch_6_4/vector/v.digit/line.c
   grass/branches/releasebranch_6_4/vector/v.digit/toolbox.tcl
Log:
v.digit Fix bind_scroll_list bug (#638), do not create points on mouse scroll. (merge from devel6 r44921 r44928 r44982)

Modified: grass/branches/releasebranch_6_4/vector/v.digit/line.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.digit/line.c	2011-01-28 10:18:51 UTC (rev 45226)
+++ grass/branches/releasebranch_6_4/vector/v.digit/line.c	2011-01-28 10:38:44 UTC (rev 45227)
@@ -158,9 +158,11 @@
 	Tool_next = TOOL_NOTHING;
 	return 1;
     }
+    
+    if (button > 3) /* Do nothing on mouse scroll */
+	return 0;
 
-    if (nl->type & GV_POINTS) {
-	/* We can get here with button = 1 or 2 -> the same write point */
+    if (nl->type & GV_POINTS && (button == 1 ||  button == 2)) {
 	snap(&x, &y);
 	Vect_append_point(nl->Points, x, y, 0);
 
@@ -221,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 */

Modified: grass/branches/releasebranch_6_4/vector/v.digit/toolbox.tcl
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.digit/toolbox.tcl	2011-01-28 10:18:51 UTC (rev 45226)
+++ grass/branches/releasebranch_6_4/vector/v.digit/toolbox.tcl	2011-01-28 10:38:44 UTC (rev 45227)
@@ -22,6 +22,7 @@
 set prompt_middle [G_msg "Middle button"]
 set prompt_right [G_msg "Right button"]
 set coor ""
+set bind_scroll_list {}
 
 wm title . "v.digit toolbox - $map_name@$map_mapset"
 



More information about the grass-commit mailing list