[GRASS-SVN] r30035 - grass/trunk/visualization/nviz/scripts
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Feb 9 13:26:01 EST 2008
Author: cmbarton
Date: 2008-02-09 13:26:01 -0500 (Sat, 09 Feb 2008)
New Revision: 30035
Modified:
grass/trunk/visualization/nviz/scripts/flythrough.tcl
grass/trunk/visualization/nviz/scripts/nviz2.2_script
grass/trunk/visualization/nviz/scripts/panel_main.tcl
Log:
Further fix of fly-though and application of Maris Nartiss' patch
Modified: grass/trunk/visualization/nviz/scripts/flythrough.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/flythrough.tcl 2008-02-09 17:59:40 UTC (rev 30034)
+++ grass/trunk/visualization/nviz/scripts/flythrough.tcl 2008-02-09 18:26:01 UTC (rev 30035)
@@ -50,7 +50,7 @@
################################################################################
proc mkFlyButtons {BASE frame draw_lab draw_var1 draw_var2} {
- global fly
+ global Nv_ fly draw_option
# Flythrough menus
set fly(EYE_RADIOBUTTON) $draw_var1
@@ -58,7 +58,7 @@
set fly(FLY_RADIOBUTTON) [radiobutton $BASE.$frame.b3 \
-variable draw_option -value 3 -text "fly"\
- -command "fly_change_mode 0" ]
+ -command "set Nv_(FlyThrough) 1; fly_change_mode 0" ]
set fly(FLY_MENUBUTTON) $BASE.$frame.flymenu
Modified: grass/trunk/visualization/nviz/scripts/nviz2.2_script
===================================================================
--- grass/trunk/visualization/nviz/scripts/nviz2.2_script 2008-02-09 17:59:40 UTC (rev 30034)
+++ grass/trunk/visualization/nviz/scripts/nviz2.2_script 2008-02-09 18:26:01 UTC (rev 30035)
@@ -720,15 +720,22 @@
}
proc load_3dview { dummy } {
- global Nv_
+ global XY Nv_ draw_option Nauto_draw
# 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
+ appBusy
+ # Do not redraw automaticly display while loading state...
+ set oNauto_draw $Nauto_draw
+ set Nauto_draw 0
+ #do a quick draw to make sure display initialized
+ Nquick_draw
+ Nload_3dview $file_name
+
#do a quick draw to make sure display initialized
Nquick_draw
-
Nload_3dview $file_name
#Reset position GUI
@@ -736,10 +743,15 @@
#reset height
Nv_setEntry $Nv_(main_BASE).midf.height.f.entry $ht
Nv_floatscaleCallback $Nv_(main_BASE).midf.height e 2 null $ht
- change_display 2
- change_display 1
+ #change_display 2
+ #change_display 1
+ if { $draw_option == 1 } { change_display 0 } \
+ elseif { $draw_option == 0 } { change_display 1 }
+
Nquick_draw
+ appNotBusy
+ set Nauto_draw $oNauto_draw
}
########################################
# Procedure to manually set canvas size
Modified: grass/trunk/visualization/nviz/scripts/panel_main.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/panel_main.tcl 2008-02-09 17:59:40 UTC (rev 30034)
+++ grass/trunk/visualization/nviz/scripts/panel_main.tcl 2008-02-09 18:26:01 UTC (rev 30035)
@@ -174,11 +174,11 @@
set draw_var1 [radiobutton $BASE.midt.b1 -text "eye" \
-variable draw_option -value 0 -width 8 \
- -command "set Nv_(FlyThrough) 0; change_display 1" ]
+ -command "change_display 1" ]
set draw_var2 [radiobutton $BASE.midt.b2 -text "center" \
-variable draw_option -value 1 -width 8 \
- -command "set Nv_(FlyThrough) 0; change_display 0" ]
+ -command "change_display 0" ]
$draw_var1 select
help $BASE.midt.b1 balloon "Change view by moving eye position"
@@ -191,7 +191,7 @@
# original code
pack $draw_lab $draw_var1 $draw_var2 -side left -expand 0
}
- help $BASE.midt.b3 balloon "Change view interactively in display"
+ help $BASE.midt.b3 balloon "Change view using mouse to control fly-through"
# make position "widget"
set XY [Nv_mkXYScale $BASE.midf.pos puck XY_POS 125 125 105 105 update_eye_position]
@@ -414,6 +414,7 @@
return $W.zexag
}
+
proc mk_hgt_slider {W} {
global Nv_
@@ -507,22 +508,17 @@
set h [lindex [Nget_real_position 1] 2]
set min [lindex [Nget_height] 1]
set max [lindex [Nget_height] 2]
+ set Nv_(FlyThrough) 0
if {$flag == 1} {
#draw eye position
inform "Set eye position"
set XY [Nv_mkXYScale $NAME puck XY_POS 125 125 105 105 update_eye_position]
- update_height $h
- reset_res
- move_position
} elseif {$flag == 0} {
#draw center position
inform "Set center of view position"
set XY [Nv_mkXYScale $NAME cross XY_POS 125 125 109 109 update_center_position]
- update_height $h
- reset_res
- move_position
}
if {$Nv_(FlyThrough) == 0} {
@@ -530,6 +526,10 @@
} else {
pack $XY -side left -before $Nv_(HEIGHT_SLIDER)
}
+
+ update_height $h
+ reset_res
+ move_position
if {$Nauto_draw == 1} {Ndraw_all}
}
More information about the grass-commit
mailing list