[GRASS-SVN] r36078 - grass/branches/develbranch_6/gui/tcltk/gis.m
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Feb 24 05:43:07 EST 2009
Author: marisn
Date: 2009-02-24 05:43:07 -0500 (Tue, 24 Feb 2009)
New Revision: 36078
Modified:
grass/branches/develbranch_6/gui/tcltk/gis.m/rastnums.tcl
Log:
Offer to constrain map to region geometry when displaying cell value layer
Modified: grass/branches/develbranch_6/gui/tcltk/gis.m/rastnums.tcl
===================================================================
--- grass/branches/develbranch_6/gui/tcltk/gis.m/rastnums.tcl 2009-02-24 09:30:03 UTC (rev 36077)
+++ grass/branches/develbranch_6/gui/tcltk/gis.m/rastnums.tcl 2009-02-24 10:43:07 UTC (rev 36078)
@@ -10,13 +10,13 @@
##########################################################################
namespace eval GmRnums {
- variable array opt # rnums current options
+ variable array opt ;# rnums current options
variable count 1
- variable array tree # mon
- variable array lfile # raster
- variable array lfilemask # raster
+ variable array tree ;# mon
+ variable array lfile ;# raster
+ variable array lfilemask ;# raster
variable optlist
- variable array dup # vector
+ variable array dup ;# vector
}
###############################################################################
@@ -270,9 +270,18 @@
set mapdispht $env(GRASS_HEIGHT)
set mapdispwd $env(GRASS_WIDTH)
} elseif {$opt($id,1,_check)} {
- set msgtxt [G_msg "Cell values can only be displayed\nfor regions of < 10,000 cells"]
- set answer [tk_messageBox -message $msgtxt -type ok -parent .mapcan($mon)]
- if { $answer == "ok" } {return}
+ if { $MapCanvas::exploremode($mon) == 0 } {
+ set msgtxt [G_msg "Cell values can only be displayed\nfor regions of < 10,000 cells"]
+ set answer [tk_messageBox -message $msgtxt -type ok -parent .mapcan($mon)]
+ if { $answer == "ok" } {return}
+ } else {
+ set answer [tk_dialog .mapcan($mon).constrain \
+ [G_msg "Constrain map to region geometry?"] \
+ [G_msg "Cell values can only be displayed for \nregions of < 10,000 cells. Map in explore mode may contain more than 10,000 cells.\n\n\
+It's suggested to constrain map to region geometry to display cell values."] questhead 0 \
+ [G_msg "Constrain map to region geometry"] [G_msg "Leave in explore mode"]]
+ if { $answer == 0 } { MapCanvas::exploremode $mon 0 }
+ }
}
# set grass font environmental variable to whatever it was when we started
More information about the grass-commit
mailing list