[GRASS-SVN] r31019 - grass/trunk/gui/tcltk/gis.m

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 17 06:00:59 EDT 2008


Author: marisn
Date: 2008-04-17 06:00:58 -0400 (Thu, 17 Apr 2008)
New Revision: 31019

Modified:
   grass/trunk/gui/tcltk/gis.m/mapcanvas.tcl
Log:
Fix saving saving current display geometry to named region in gis.m (Ticket #112). Thanks to Ivan Shmakov for help.

Modified: grass/trunk/gui/tcltk/gis.m/mapcanvas.tcl
===================================================================
--- grass/trunk/gui/tcltk/gis.m/mapcanvas.tcl	2008-04-17 07:55:07 UTC (rev 31018)
+++ grass/trunk/gui/tcltk/gis.m/mapcanvas.tcl	2008-04-17 10:00:58 UTC (rev 31019)
@@ -1171,7 +1171,7 @@
 	global devnull
 
 	#get current region settings for resolution
-	if {![catch {open [concat "|g.region" "-ugp" $args "2> $devnull"] r} input]} {
+	if {![catch {open [concat "|g.region" "-ugp " "2> $devnull"] r} input]} {
 		while {[gets $input line] >= 0} {
 			if { [regexp -nocase {^([a-z]+)=(.*)$} $line trash key value] } {
 				set parts($key) $value
@@ -1180,10 +1180,12 @@
 		
 		if {[catch {close $input} error]} {
 			GmLib::errmsg $error [G_msg "Error reading current resolution with g.region"]
+			return
 		}
 		
 	} else {
-		puts $input
+		GmLib::errmsg $error [G_msg "Error reading current resolution with g.region"]
+		return
 	}
 
 	#set computational region extents while maintaining current resolution



More information about the grass-commit mailing list