Changeset 2622 for trunk


Ignore:
Timestamp:
Oct 13, 2011 2:07:04 PM (13 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

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

    r2621 r2622  
    353353    pack $itk_component(streamlines) -padx 2 -pady 2
    354354
     355    itk_component add cutplane {
     356        Rappture::PushButton $f.cutplane \
     357            -onimage [Rappture::icon cutbutton] \
     358            -offimage [Rappture::icon cutbutton] \
     359            -variable [itcl::scope _settings(cutplane-visible)] \
     360            -command [itcl::code $this AdjustSetting cutplane-visible]
     361    }
     362    $itk_component(cutplane) select
     363    Rappture::Tooltip::for $itk_component(cutplane) \
     364        "Show/Hide cutplanes"
     365    pack $itk_component(cutplane) -padx 2 -pady 2
     366
     367
    355368    if { [catch {
    356369        BuildVolumeTab
     
    26452658
    26462659    # Compute the value of the point
    2647     set t [expr 1.0 - (double($imgY) / double($imgHeight-1))]
    2648     set value [expr $t * ($_limits(vmax) - $_limits(vmin)) + $_limits(vmin)]
     2660    if { [info exists _limits(vmax)] && [info exists _limits(vmin)] } {
     2661        set t [expr 1.0 - (double($imgY) / double($imgHeight-1))]
     2662        set value [expr $t * ($_limits(vmax) - $_limits(vmin)) + $_limits(vmin)]
     2663    } else {
     2664        set value 0.0
     2665    }
    26492666    set tipx [expr $x + 15]
    26502667    set tipy [expr $y - 5]
Note: See TracChangeset for help on using the changeset viewer.