Ignore:
Timestamp:
Dec 1, 2008 2:05:26 PM (16 years ago)
Author:
gah
Message:

Fix for interrupted nanovis session

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/heightmapviewer.tcl

    r1246 r1250  
     1
    12# ----------------------------------------------------------------------
    23#  COMPONENT: heightmapviewer - 3D volume rendering
     
    6768    protected method _send_dataobjs {}
    6869    protected method ReceiveImage {option size}
    69     private method ReceiveLegend {ivol vmin vmax size}
     70    private method ReceiveLegend {tf vmin vmax size}
    7071    protected method _receive_echo {channel {data ""}}
    7172
     
    236237        -command [itcl::code $this _fixSettings wireframe]
    237238    grid $inner.f.wireframe -row 3 -column 0 -sticky w
    238 
    239     set ::Rappture::HeightmapViewer::settings_($this-shading) "smooth"
    240     ::checkbutton $inner.f.shading \
    241         -text "Flat Shading" \
    242         -onvalue "flat" -offvalue "smooth" \
    243         -variable ::Rappture::HeightmapViewer::settings_($this-shading) \
    244         -command [itcl::code $this _fixSettings shading]
    245     grid $inner.f.shading -row 4 -column 0 -sticky w
    246239
    247240    # Legend
     
    676669
    677670# ----------------------------------------------------------------------
    678 # USAGE: ReceiveLegend <volume> <vmin> <vmax> <size>
     671# USAGE: ReceiveLegend <tf> <vmin> <vmax> <size>
    679672#
    680673# Invoked automatically whenever the "legend" command comes in from
     
    682675# specified <size> will follow.
    683676# ----------------------------------------------------------------------
    684 itcl::body Rappture::HeightmapViewer::ReceiveLegend {ivol vmin vmax size} {
     677itcl::body Rappture::HeightmapViewer::ReceiveLegend {tf vmin vmax size} {
    685678    if { [IsConnected] } {
    686679        set bytes [ReceiveBytes $size]
     
    766759         _send "grid linecolor [Color2RGB $itk_option(-plotoutline)]"
    767760     }
    768     _fixSettings shading
    769761    _fixSettings wireframe
    770762    _fixSettings grid
     
    857849        click {
    858850            $itk_component(3dview) configure -cursor fleur
    859             array set click [subst {
     851            array set click_ [subst {
    860852                x       $x
    861853                y       $y
     
    878870                    set dx [expr {double($x-$click_(x))/$w}]
    879871                    set dy [expr {double($y-$click_(y))/$h}]
    880                 }]} {
     872                }] != 0 } {
    881873                    return
    882874                }
     
    977969            }
    978970        }
    979         "shading" {
    980             if { [IsConnected] } {
    981                 _send "heightmap shading $settings_($this-shading)"
    982             }
    983         }
    984971        "wireframe" {
    985972            if { [IsConnected] } {
Note: See TracChangeset for help on using the changeset viewer.