- Timestamp:
- Nov 13, 2014 2:33:44 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkisosurfaceviewer.tcl
r4704 r4715 102 102 private method Rotate {option x y} 103 103 private method SetCurrentColormap { color } 104 private method SetCurrentFieldName { dataobj } 104 105 private method SetLegendTip { x y } 105 private method SetObjectStyle { dataobj comp } 106 private method SetObjectStyle { dataobj comp } 106 107 private method SetOrientation { side } 107 private method Slice {option args} 108 private method Slice {option args} 108 109 private method Zoom {option} 109 110 private method ViewToQuaternion {} { … … 1001 1002 set _first "" 1002 1003 SendCmd "dataset visible 0" 1004 eval scale $_dlist 1003 1005 foreach dataobj [get -objects] { 1004 1006 if { [info exists _obj2ovride($dataobj-raise)] && $_first == "" } { 1005 1007 set _first $dataobj 1008 SetCurrentFieldName $dataobj 1006 1009 } 1007 1010 set _obj2datasets($dataobj) "" … … 1039 1042 } 1040 1043 1041 if { $_first != "" } {1042 $itk_component(field) choices delete 0 end1043 $itk_component(fieldmenu) delete 0 end1044 array unset _fields1045 set _curFldName ""1046 foreach cname [$_first components] {1047 foreach fname [$_first fieldnames $cname] {1048 if { [info exists _fields($fname)] } {1049 continue1050 }1051 foreach { label units components } \1052 [$_first fieldinfo $fname] break1053 $itk_component(field) choices insert end "$fname" "$label"1054 $itk_component(fieldmenu) add radiobutton -label "$label" \1055 -value $label -variable [itcl::scope _curFldLabel] \1056 -selectcolor red \1057 -activebackground $itk_option(-plotbackground) \1058 -activeforeground $itk_option(-plotforeground) \1059 -font "Arial 8" \1060 -command [itcl::code $this Combo invoke]1061 set _fields($fname) [list $label $units $components]1062 if { $_curFldName == "" } {1063 set _curFldName $fname1064 set _curFldLabel $label1065 }1066 }1067 }1068 $itk_component(field) value $_curFldLabel1069 1070 if { ![info exists _limits($_curFldName)] } {1071 SendCmd "dataset maprange all"1072 } else {1073 set limits $_limits($_curFldName)1074 SendCmd "dataset maprange explicit $limits $_curFldName"1075 if { $limits != $_currentLimits } {1076 set _currentLimits $limits1077 EventuallyChangeContourLevels1078 }1079 }1080 }1081 1044 InitSettings -cutplanesvisible -isosurfacevisible -outline 1082 1045 if { $_reset } { … … 2628 2591 set _contourList(values) $values 2629 2592 } 2593 2594 itcl::body Rappture::VtkIsosurfaceViewer::SetCurrentFieldName { dataobj } { 2595 set _first $dataobj 2596 $itk_component(field) choices delete 0 end 2597 $itk_component(fieldmenu) delete 0 end 2598 array unset _fields 2599 set _curFldName "" 2600 foreach cname [$_first components] { 2601 foreach fname [$_first fieldnames $cname] { 2602 if { [info exists _fields($fname)] } { 2603 continue 2604 } 2605 foreach { label units components } \ 2606 [$_first fieldinfo $fname] break 2607 $itk_component(field) choices insert end "$fname" "$label" 2608 $itk_component(fieldmenu) add radiobutton -label "$label" \ 2609 -value $label -variable [itcl::scope _curFldLabel] \ 2610 -selectcolor red \ 2611 -activebackground $itk_option(-plotbackground) \ 2612 -activeforeground $itk_option(-plotforeground) \ 2613 -font "Arial 8" \ 2614 -command [itcl::code $this Combo invoke] 2615 set _fields($fname) [list $label $units $components] 2616 if { $_curFldName == "" } { 2617 set _curFldName $fname 2618 set _curFldLabel $label 2619 } 2620 } 2621 } 2622 $itk_component(field) value $_curFldLabel 2623 if { ![info exists _limits($_curFldName)] } { 2624 SendCmd "dataset maprange all" 2625 } else { 2626 set limits $_limits($_curFldName) 2627 SendCmd "dataset maprange explicit $limits $_curFldName" 2628 if { $limits != $_currentLimits } { 2629 set _currentLimits $limits 2630 EventuallyChangeContourLevels 2631 } 2632 } 2633 }
Note: See TracChangeset
for help on using the changeset viewer.