Changeset 5465 for branches/1.4


Ignore:
Timestamp:
May 7, 2015 1:49:00 PM (8 years ago)
Author:
ldelgass
Message:

backport some vtkvolume fixes from trunk

File:
1 edited

Legend:

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

    r5445 r5465  
    148148    private variable _curFldLabel ""
    149149    private variable _colorMode "scalar"; # Mode of colormap (vmag or scalar)
    150     private variable _cutplaneCmd "cutplane"
     150    private variable _cutplaneCmd "imgcutplane"
    151151    private variable _allowMultiComponent 0
    152152
     
    449449    SendCmd "screen size $_width $_height"
    450450
    451     set _legendPending 1
     451    EventuallyRequestLegend
    452452    set _resizePending 0
    453453}
     
    829829itcl::body Rappture::VtkVolumeViewer::disconnect {} {
    830830    Disconnect
    831     set _reset 1
    832831}
    833832
     
    893892        set _hardcopy($tag) $bytes
    894893    }
    895     if { $_legendPending } {
    896         RequestLegend
    897     }
    898894}
    899895
     
    960956    # generates a new call to Rebuild).
    961957    StartBufferingCommands
    962 
    963     set _legendPending 1
    964958
    965959    if { $_width != $w || $_height != $h || $_reset } {
     
    10911085
    10921086    if { $_reset } {
    1093         Zoom reset
     1087        SendCmd "camera reset"
     1088        SendCmd "camera zoom $_view(-zoom)"
     1089        RequestLegend
    10941090        set _reset 0
    10951091    }
     
    14811477                ChangeColormap $dataobj $comp $color
    14821478            }
    1483             set _legendPending 1
     1479            EventuallyRequestLegend
    14841480        }
    14851481        "-field" {
     
    15221518#
    15231519#       Request a new legend from the server.  The size of the legend
    1524 #       is determined from the height of the canvas.  It will be rotated
    1525 #       to be vertical when drawn.
     1520#       is determined from the height of the canvas.
    15261521#
    15271522itcl::body Rappture::VtkVolumeViewer::RequestLegend {} {
     1523    set _legendPending 0
    15281524    set font "Arial 8"
    15291525    set lineht [font metrics $font -linespace]
     
    16911687        3,0 $inner.legend -cspan 2 -anchor w \
    16921688        4,0 $inner.background_l -anchor e -pady 2 \
    1693         4,1 $inner.background -fill x \
     1689        4,1 $inner.background -fill x
    16941690
    16951691    blt::table configure $inner r* -resize none
     
    21722168# ----------------------------------------------------------------------
    21732169itcl::body Rappture::VtkVolumeViewer::ReceiveLegend { colormap title vmin vmax size } {
    2174     set _legendPending 0
    21752170    if { [isconnected] } {
    21762171        set bytes [ReceiveBytes $size]
     
    21892184# DrawLegend --
    21902185#
    2191 #       Draws the legend in it's own canvas which resides to the right
    2192 #       of the contour plot area.
    2193 #
    2194 itcl::body Rappture::VtkVolumeViewer::DrawLegend { } {
     2186itcl::body Rappture::VtkVolumeViewer::DrawLegend {} {
    21952187    set fname $_curFldName
    21962188    set c $itk_component(view)
     
    24162408
    24172409#
    2418 # GetDatasetsWithComponents --
     2410# GetDatasetsWithComponent --
    24192411#
    24202412#       Returns a list of all the datasets (known by the combination of
Note: See TracChangeset for help on using the changeset viewer.