Changeset 6243 for branches


Ignore:
Timestamp:
Apr 4, 2016, 8:37:45 AM (9 years ago)
Author:
ldelgass
Message:

merge r6242 from 1.6 branch

Location:
branches/1.7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.7

  • branches/1.7/gui/scripts/flowvisviewer.tcl

    r6155 r6243  
    134134    private variable _dataset2style    ;# maps dataobj-component to transfunc
    135135    private variable _style2datasets   ;# maps tf back to list of
    136                                        ;# dataobj-components using the tf.
     136                                        # dataobj-components using the tf.
    137137    private variable _dataset2flow     ;# Maps dataobj-component to a flow.
    138138
     
    228228    set _limits(vmin) 0.0
    229229    set _limits(vmax) 1.0
    230     set _reset 1
    231230
    232231    array set _settings [subst {
     
    567566
    568567    eval itk_initialize $args
    569 
    570568    Connect
    571569}
     
    593591# ----------------------------------------------------------------------
    594592itcl::body Rappture::FlowvisViewer::add {dataobj {settings ""}} {
     593    if { ![$dataobj isvalid] } {
     594        return;                         # Object doesn't contain valid data.
     595    }
    595596    array set params {
    596597        -color auto
     
    690691        set args $_dlist
    691692    }
    692 
    693693    # Delete all specified dataobjs
    694694    set changed 0
     
    710710        foreach tf [array names _style2datasets] {
    711711            set list {}
    712             foreach {dataobj cname} $_style2datasets($tf) break
    713             if { [info exists _serverDatasets($dataobj-$cname)] } {
    714                 lappend list $dataobj $cname
     712            foreach {dataobj cname} $_style2datasets($tf) {
     713                if { [info exists _serverDatasets($dataobj-$cname)] } {
     714                    lappend list $dataobj $cname
     715                }
    715716            }
    716717            if { $list == "" } {
     
    832833                }
    833834                default {
    834                     error "bad download format $_downloadPopup(format)"
     835                    error "bad download format \"$_downloadPopup(format)\""
    835836                }
    836837            }
     
    964965    array set info $args
    965966    set bytes [ReceiveBytes $info(-bytes)]
    966     ReceiveEcho <<line "<read $info(-bytes) bytes"
    967     switch -- $info(-type)  {
     967    switch -- $info(-type) {
    968968        "image" {
     969            #puts stderr "received image [image width $_image(plot)]x[image height $_image(plot)]"
    969970            $_image(plot) configure -data $bytes
    970             #puts stderr "image received [image width $_image(plot)] by [image height $_image(plot)]"
    971971        }
    972972        "print" {
     
    979979        }
    980980        default {
    981             puts stderr "unknown download type $info(-type)"
     981            puts stderr "unknown image type $info(-type)"
    982982        }
    983983    }
     
    10061006    }
    10071007
     1008    if {$tag == "" || ![info exists _dataset2style($tag)]} {
     1009        return
     1010    }
    10081011    # Display the markers used by the current transfer function.
    10091012    set tf $_dataset2style($tag)
     
    10151018    $c coords vmax [expr {$w-$lx}] $ly
    10161019
     1020    if { $_first == "" } {
     1021        return
     1022    }
    10171023    set title [$_first hints label]
    10181024    set units [$_first hints units]
     
    16741680        # Have to defer creation of isomarkers until we have data limits
    16751681        if { [info exists style(-markers)] &&
    1676              [llength $style(-markers)] > 0  } {
     1682             [llength $style(-markers)] > 0 } {
    16771683            ParseMarkersOption $tf $style(-markers)
    16781684        } else {
  • branches/1.7/gui/scripts/nanovisviewer.tcl

    r6155 r6243  
    570570        }
    571571        controls {
    572             set popup .nanovisdownload
     572            set popup .nanovisviewerdownload
    573573            if { ![winfo exists $popup] } {
    574574                set inner [BuildDownloadPopup $popup [lindex $args 0]]
     
    586586        }
    587587        now {
    588             set popup .nanovisdownload
     588            set popup .nanovisviewerdownload
    589589            if { [winfo exists $popup] } {
    590590                $popup deactivate
     
    597597                    return [$this GetVtkData [lindex $args 0]]
    598598                }
    599             }
    600             return ""
     599                default {
     600                    error "bad download format \"$_downloadPopup(format)\""
     601                }
     602            }
    601603        }
    602604        default {
     
    691693    # Ensure that the global thickness setting (in the slider
    692694    # settings widget) is used for the active transfer-function.  Update
    693     # the value in the _settings varible.
     695    # the value in the _settings variable.
    694696    # Scale values between 0.00001 and 0.01000
    695697    set thickness [expr {double($_settings(-thickness)) * 0.0001}]
     
    736738    array set info $args
    737739    set bytes [ReceiveBytes $info(-bytes)]
    738     ReceiveEcho <<line "<read $info(-bytes) bytes"
    739     if { $info(-type) == "image" } {
    740         ReceiveEcho "for [image width $_image(plot)]x[image height $_image(plot)] image>"
    741         $_image(plot) configure -data $bytes
    742     } elseif { $info(-type) == "print" } {
    743         set tag $this-print-$info(-token)
    744         set _hardcopy($tag) $bytes
     740    switch -- $info(-type) {
     741        "image" {
     742            #puts stderr "received image [image width $_image(plot)]x[image height $_image(plot)]"
     743            $_image(plot) configure -data $bytes
     744        }
     745        "print" {
     746            set tag $this-print-$info(-token)
     747            set _hardcopy($tag) $bytes
     748        }
     749        default {
     750            puts stderr "unknown image type $info(-type)"
     751        }
    745752    }
    746753}
     
    776783    $c coords vmax [expr {$w-$lx}] $ly
    777784
     785    if { $_first == "" } {
     786        return
     787    }
    778788    set title [$_first hints label]
    779789    set units [$_first hints units]
     
    926936                # Send the data as one huge base64-encoded mess -- yuck!
    927937                if { [$dataobj type] == "dx" } {
    928                     if { ![$dataobj isvalid] } {
    929                         puts stderr "??? $dataobj is invalid"
    930                     }
    931938                    set data [$dataobj blob $cname]
    932939                } else {
Note: See TracChangeset for help on using the changeset viewer.