- Timestamp:
- Apr 4, 2016, 8:37:45 AM (9 years ago)
- Location:
- branches/1.7
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.7
- Property svn:mergeinfo changed
/branches/1.6 (added) merged: 6242 /trunk merged: 6239-6241
- Property svn:mergeinfo changed
-
branches/1.7/gui/scripts/flowvisviewer.tcl
r6155 r6243 134 134 private variable _dataset2style ;# maps dataobj-component to transfunc 135 135 private variable _style2datasets ;# maps tf back to list of 136 ;# dataobj-components using the tf.136 # dataobj-components using the tf. 137 137 private variable _dataset2flow ;# Maps dataobj-component to a flow. 138 138 … … 228 228 set _limits(vmin) 0.0 229 229 set _limits(vmax) 1.0 230 set _reset 1231 230 232 231 array set _settings [subst { … … 567 566 568 567 eval itk_initialize $args 569 570 568 Connect 571 569 } … … 593 591 # ---------------------------------------------------------------------- 594 592 itcl::body Rappture::FlowvisViewer::add {dataobj {settings ""}} { 593 if { ![$dataobj isvalid] } { 594 return; # Object doesn't contain valid data. 595 } 595 596 array set params { 596 597 -color auto … … 690 691 set args $_dlist 691 692 } 692 693 693 # Delete all specified dataobjs 694 694 set changed 0 … … 710 710 foreach tf [array names _style2datasets] { 711 711 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 } 715 716 } 716 717 if { $list == "" } { … … 832 833 } 833 834 default { 834 error "bad download format $_downloadPopup(format)"835 error "bad download format \"$_downloadPopup(format)\"" 835 836 } 836 837 } … … 964 965 array set info $args 965 966 set bytes [ReceiveBytes $info(-bytes)] 966 ReceiveEcho <<line "<read $info(-bytes) bytes" 967 switch -- $info(-type) { 967 switch -- $info(-type) { 968 968 "image" { 969 #puts stderr "received image [image width $_image(plot)]x[image height $_image(plot)]" 969 970 $_image(plot) configure -data $bytes 970 #puts stderr "image received [image width $_image(plot)] by [image height $_image(plot)]"971 971 } 972 972 "print" { … … 979 979 } 980 980 default { 981 puts stderr "unknown downloadtype $info(-type)"981 puts stderr "unknown image type $info(-type)" 982 982 } 983 983 } … … 1006 1006 } 1007 1007 1008 if {$tag == "" || ![info exists _dataset2style($tag)]} { 1009 return 1010 } 1008 1011 # Display the markers used by the current transfer function. 1009 1012 set tf $_dataset2style($tag) … … 1015 1018 $c coords vmax [expr {$w-$lx}] $ly 1016 1019 1020 if { $_first == "" } { 1021 return 1022 } 1017 1023 set title [$_first hints label] 1018 1024 set units [$_first hints units] … … 1674 1680 # Have to defer creation of isomarkers until we have data limits 1675 1681 if { [info exists style(-markers)] && 1676 [llength $style(-markers)] > 0 1682 [llength $style(-markers)] > 0 } { 1677 1683 ParseMarkersOption $tf $style(-markers) 1678 1684 } else { -
branches/1.7/gui/scripts/nanovisviewer.tcl
r6155 r6243 570 570 } 571 571 controls { 572 set popup .nanovis download572 set popup .nanovisviewerdownload 573 573 if { ![winfo exists $popup] } { 574 574 set inner [BuildDownloadPopup $popup [lindex $args 0]] … … 586 586 } 587 587 now { 588 set popup .nanovis download588 set popup .nanovisviewerdownload 589 589 if { [winfo exists $popup] } { 590 590 $popup deactivate … … 597 597 return [$this GetVtkData [lindex $args 0]] 598 598 } 599 } 600 return "" 599 default { 600 error "bad download format \"$_downloadPopup(format)\"" 601 } 602 } 601 603 } 602 604 default { … … 691 693 # Ensure that the global thickness setting (in the slider 692 694 # settings widget) is used for the active transfer-function. Update 693 # the value in the _settings vari ble.695 # the value in the _settings variable. 694 696 # Scale values between 0.00001 and 0.01000 695 697 set thickness [expr {double($_settings(-thickness)) * 0.0001}] … … 736 738 array set info $args 737 739 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 } 745 752 } 746 753 } … … 776 783 $c coords vmax [expr {$w-$lx}] $ly 777 784 785 if { $_first == "" } { 786 return 787 } 778 788 set title [$_first hints label] 779 789 set units [$_first hints units] … … 926 936 # Send the data as one huge base64-encoded mess -- yuck! 927 937 if { [$dataobj type] == "dx" } { 928 if { ![$dataobj isvalid] } {929 puts stderr "??? $dataobj is invalid"930 }931 938 set data [$dataobj blob $cname] 932 939 } else {
Note: See TracChangeset
for help on using the changeset viewer.