Changeset 4443 for branches/1.3


Ignore:
Timestamp:
Jun 27, 2014 12:24:30 AM (6 years ago)
Author:
ldelgass
Message:

cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3/gui/scripts/vtkvolumeviewer.tcl

    r4439 r4443  
    88# ======================================================================
    99#  AUTHOR:  Michael McLennan, Purdue University
    10 #  Copyright (c) 2004-2012  HUBzero Foundation, LLC
     10#  Copyright (c) 2004-2014  HUBzero Foundation, LLC
    1111#
    1212#  See the file "license.terms" for information on usage and
     
    6767    protected method Disconnect {}
    6868    protected method DoResize {}
    69     protected method DoReseed {}
    7069    protected method DoRotate {}
    7170    protected method AdjustSetting {what {value ""}}
     
    9190    private method EnterLegend { x y }
    9291    private method EventuallyResize { w h }
    93     private method EventuallyReseed { numPoints }
    9492    private method EventuallyRotate { q }
    9593    private method EventuallySetCutplane { axis args }
     
    129127    private variable _start 0
    130128    private variable _title ""
    131     private variable _seeds
    132129
    133130    common _downloadPopup;              # download options from popup
     
    136133    private variable _height 0
    137134    private variable _resizePending 0
    138     private variable _reseedPending 0
    139135    private variable _rotatePending 0
    140136    private variable _cutplanePending 0
     
    165161    $_dispatcher register !resize
    166162    $_dispatcher dispatch $this !resize "[itcl::code $this DoResize]; list"
    167 
    168     # Reseed event
    169     $_dispatcher register !reseed
    170     $_dispatcher dispatch $this !reseed "[itcl::code $this DoReseed]; list"
    171163
    172164    # Rotate event
     
    344336        puts stderr errs=$errs
    345337    }
     338
    346339    # Legend
    347 
    348340    set _image(legend) [image create photo]
    349341    itk_component add legend {
     
    374366        [itcl::code $this EventuallyResize %w %h]
    375367
    376     if 0 {
    377     bind $itk_component(view) <Configure> \
    378         [itcl::code $this EventuallyResize %w %h]
    379     }
    380368    # Bindings for panning via mouse
    381369    bind $itk_component(view) <ButtonPress-2> \
     
    468456}
    469457
    470 itcl::body Rappture::VtkVolumeViewer::EventuallyReseed { numPoints } {
    471     set _numSeeds $numPoints
    472     if { !$_reseedPending } {
    473         set _reseedPending 1
    474         $_dispatcher event -after 600 !reseed
    475     }
    476 }
    477 
    478458set rotate_delay 100
    479459
     
    805785    $_dispatcher cancel !rebuild
    806786    $_dispatcher cancel !resize
    807     $_dispatcher cancel !reseed
    808787    $_dispatcher cancel !rotate
    809788    $_dispatcher cancel !xcutplane
     
    816795    array unset _data
    817796    array unset _colormaps
    818     array unset _seeds
    819797    array unset _dataset2style
    820798    array unset _obj2datasets
     
    994972            set label [$_first hints ${axis}label]
    995973            if { $label != "" } {
    996                 SendCmd "axis name $axis $label"
     974                SendCmd [list axis name $axis $label]
    997975            }
    998976            set units [$_first hints ${axis}units]
    999977            if { $units != "" } {
    1000                 SendCmd "axis units $axis $units"
     978                SendCmd [list axis units $axis $units]
    1001979            }
    1002980        }
     
    12841262    switch -- $what {
    12851263        "volumeVisible" {
    1286             set bool $_settings(volumeVisible)
     1264            set bool $_settings($what)
    12871265            foreach dataset [CurrentDatasets -visible] {
    12881266                SendCmd "volume visible $bool $dataset"
     
    12971275        }
    12981276        "volume-material" {
    1299             set val $_settings(volume-material)
     1277            set val $_settings($what)
    13001278            set diffuse [expr {0.01*$val}]
    13011279            set specular [expr {0.01*$val}]
     
    13081286        }
    13091287        "volumeLighting" {
    1310             set bool $_settings(volumeLighting)
     1288            set bool $_settings($what)
    13111289            foreach dataset [CurrentDatasets -visible] {
    13121290                SendCmd "volume lighting $bool $dataset"
     
    13141292        }
    13151293        "volume-quality" {
    1316             set val $_settings(volume-quality)
     1294            set val $_settings($what)
    13171295            set val [expr {0.01*$val}]
    13181296            foreach dataset [CurrentDatasets -visible] {
     
    13211299        }
    13221300        "axesVisible" {
    1323             set bool $_settings(axesVisible)
     1301            set bool $_settings($what)
    13241302            SendCmd "axis visible all $bool"
    13251303        }
    13261304        "axisLabels" {
    1327             set bool $_settings(axisLabels)
     1305            set bool $_settings($what)
    13281306            SendCmd "axis labels all $bool"
    13291307        }
     
    13941372        "volume-palette" {
    13951373            set palette [$itk_component(palette) value]
    1396             set _settings(volume-palette) $palette
     1374            set _settings($what) $palette
    13971375            foreach dataset [CurrentDatasets -visible $_first] {
    13981376                foreach {dataobj comp} [split $dataset -] break
     
    14011379            set _legendPending 1
    14021380        }
    1403         "volume-palette" {
    1404             set palette [$itk_component(palette) value]
    1405             set _settings(volume-palette) $palette
    1406             foreach dataset [CurrentDatasets -visible $_first] {
    1407                 foreach {dataobj comp} [split $dataset -] break
    1408                 ChangeColormap $dataobj $comp $palette
    1409             }
    1410             set _legendPending 1
    1411         }
    14121381        "field" {
    14131382            set label [$itk_component(field) value]
    14141383            set fname [$itk_component(field) translate $label]
    1415             set _settings(field) $fname
     1384            set _settings($what) $fname
    14161385            if { [info exists _fields($fname)] } {
    14171386                foreach { label units components } $_fields($fname) break
Note: See TracChangeset for help on using the changeset viewer.