[GRASS-SVN] r41206 - grass/trunk/visualization/nviz/scripts
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Feb 27 14:45:15 EST 2010
Author: marisn
Date: 2010-02-27 14:45:15 -0500 (Sat, 27 Feb 2010)
New Revision: 41206
Modified:
grass/trunk/visualization/nviz/scripts/attIsosurfPopup.tcl
grass/trunk/visualization/nviz/scripts/attPopup.tcl
grass/trunk/visualization/nviz/scripts/mapBrowser.tcl
grass/trunk/visualization/nviz/scripts/nviz2.2_script
grass/trunk/visualization/nviz/scripts/panel_vect.tcl
grass/trunk/visualization/nviz/scripts/panel_vol.tcl
Log:
nviz: Fix also other places where closing map choices window makes nviz to go bad. Continues r41205 Spotted on issue #852
Modified: grass/trunk/visualization/nviz/scripts/attIsosurfPopup.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/attIsosurfPopup.tcl 2010-02-27 17:49:35 UTC (rev 41205)
+++ grass/trunk/visualization/nviz/scripts/attIsosurfPopup.tcl 2010-02-27 19:45:15 UTC (rev 41206)
@@ -250,7 +250,7 @@
global attIsoPopup_Status attIsoPopup_Type
set new [create_map_browser .browse_rast_file vol 1]
- if { $new == "-1" } then { return }
+ if { $new == "-1" || $new == "" } then { return }
set attIsoPopup_Type non_constant
set attIsoPopup_Status $new
Modified: grass/trunk/visualization/nviz/scripts/attPopup.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/attPopup.tcl 2010-02-27 17:49:35 UTC (rev 41205)
+++ grass/trunk/visualization/nviz/scripts/attPopup.tcl 2010-02-27 19:45:15 UTC (rev 41206)
@@ -263,7 +263,6 @@
set new [create_map_browser .browse_topo_file surf 1]
if { $new == "" || $new == -1 } then { return }
- puts "returned from create_map_browser"
set attPopup_Type non_constant
set attPopup_Status $new
}
@@ -283,7 +282,7 @@
global attPopup_Status attPopup_Type
set new [create_map_browser .browse_color_file surf 1]
- if { $new == "" } then { return }
+ if { $new == "" || $new == -1 } then { return }
set attPopup_Type non_constant
set attPopup_Status $new
@@ -362,7 +361,7 @@
global attPopup_Status attPopup_Type
set new [create_map_browser .browse_rast_file surf 1]
- if { $new == "" } then { return }
+ if { $new == "" || $new == -1 } then { return }
set attPopup_Type non_constant
set attPopup_Status $new
Modified: grass/trunk/visualization/nviz/scripts/mapBrowser.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/mapBrowser.tcl 2010-02-27 17:49:35 UTC (rev 41205)
+++ grass/trunk/visualization/nviz/scripts/mapBrowser.tcl 2010-02-27 19:45:15 UTC (rev 41206)
@@ -141,6 +141,8 @@
wm title $w "Map Browser"
tkwait visibility $w
+ # Answer must be set to not use uninitialized variable by accident
+ set map_browser($w,Answer) -1
#puts "BROWSER: $w TYPE: $type MODE: $mode"
entry $w.filename -bd 2 -relief sunken
Modified: grass/trunk/visualization/nviz/scripts/nviz2.2_script
===================================================================
--- grass/trunk/visualization/nviz/scripts/nviz2.2_script 2010-02-27 17:49:35 UTC (rev 41205)
+++ grass/trunk/visualization/nviz/scripts/nviz2.2_script 2010-02-27 19:45:15 UTC (rev 41206)
@@ -720,7 +720,7 @@
# Ask the user for a file name to save in
set file_name [create_map_browser .browse_3dview_file "3d.view" 1]
- if {$file_name == -1} then return
+ if {$file_name == -1 || $file_name == "" } then return
Nsave_3dview $file_name
}
@@ -730,7 +730,7 @@
# Ask the user for a file name to load from
set file_name [create_map_browser .browse_3dview_file "3d.view" 1]
- if {$file_name == -1} then return
+ if {$file_name == -1 || $file_name == "" } then return
appBusy
# Do not redraw automaticly display while loading state...
Modified: grass/trunk/visualization/nviz/scripts/panel_vect.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/panel_vect.tcl 2010-02-27 17:49:35 UTC (rev 41205)
+++ grass/trunk/visualization/nviz/scripts/panel_vect.tcl 2010-02-27 19:45:15 UTC (rev 41206)
@@ -333,7 +333,7 @@
# Let user know that we are busy
appBusy
- if {$new != "-1"} {
+ if { $new != "" && $new != "-1" } {
set temp [Nnew_map_obj $type]
$temp set_att map $new
set_new_curr $type [string range $temp 5 end]
Modified: grass/trunk/visualization/nviz/scripts/panel_vol.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/panel_vol.tcl 2010-02-27 17:49:35 UTC (rev 41205)
+++ grass/trunk/visualization/nviz/scripts/panel_vol.tcl 2010-02-27 19:45:15 UTC (rev 41206)
@@ -356,7 +356,7 @@
# Let user know that we are busy
appBusy
- if {$new != "-1"} {
+ if { $new != "-1" && $new != "" } {
set temp [Nnew_map_obj vol]
$temp set_att map $new
More information about the grass-commit
mailing list