[GRASS-CVS] michael: grass6/gui/tcltk/gis.m mapcanvas.tcl, 1.79, 1.80

grass at intevation.de grass at intevation.de
Sun Dec 2 20:18:36 EST 2007


Author: michael

Update of /grassrepository/grass6/gui/tcltk/gis.m
In directory doto:/tmp/cvs-serv32759

Modified Files:
	mapcanvas.tcl 
Log Message:
Changed max zoom-in check to look for 1x1 cell (i.e., region resolution) rather than 1x1 map unit.

Index: mapcanvas.tcl
===================================================================
RCS file: /grassrepository/grass6/gui/tcltk/gis.m/mapcanvas.tcl,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- mapcanvas.tcl	1 Dec 2007 16:34:07 -0000	1.79
+++ mapcanvas.tcl	3 Dec 2007 01:18:34 -0000	1.80
@@ -501,7 +501,6 @@
 	variable driver_w
 	variable driver_h
 	variable mapfile
-
 	variable monitor_zooms
 	variable exploremode
 
@@ -517,7 +516,9 @@
 
 		set mapwd [expr {abs(1.0 * ($map_e - $map_w))}]
 		set mapht [expr {abs(1.0 * ($map_n - $map_s))}]
-		if {$mapwd == 0.0 || $mapht == 0.0} {
+					   
+		# only zoom in to 1x1 cell
+		if {$monitor_zooms($mon,1,cols) < 1 || $monitor_zooms($mon,1,rows) < 1} {
 			tk_messageBox -type ok -icon info -parent .mapcan($mon) \
 				-message [G_msg "Maximum zoom-in reached"]
 			MapCanvas::zoom_back $mon




More information about the grass-commit mailing list