Changeset 5051 for branches/uiuc_vtk_viewers
- Timestamp:
- Mar 2, 2015, 6:09:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/uiuc_vtk_viewers/gui/scripts/vtkisosurfaceviewer.tcl
r5049 r5051 177 177 private variable _mouseOver ""; # what called LegendRangeAction, vmin or vmax 178 178 private variable _customRangeClick 1; # what called ToggleCustomRange 179 private variable _ignoreRangeUpdate 0; # update min/max gauges without redrawing180 179 } 181 180 … … 1118 1117 -isosurfacelighting \ 1119 1118 -field \ 1119 -range \ 1120 1120 -isosurfacevisible \ 1121 1121 -isosurfaceedges -isosurfacelighting -isosurfaceopacity \ … … 1500 1500 # the legend's min and max text will be updated 1501 1501 # when the legend is redrawn in DrawLegend 1502 set _ignoreRangeUpdate 11503 1502 SetMinMaxGauges $vmin $vmax 1504 1503 } … … 1579 1578 } 1580 1579 "-range" { 1581 if { ! $_ignoreRangeUpdate } { 1582 if { $_settings(-customrange) } { 1583 set vmin [$itk_component(min) value] 1584 set vmax [$itk_component(max) value] 1585 } else { 1586 foreach { vmin vmax } $_limits($_curFldName) break 1587 } 1588 GenerateContourList 1589 SendCmd [list contour3d contourlist $_contourList(values)] 1590 SendCmd "dataset maprange explicit $vmin $vmax $_curFldName" 1591 DrawLegend 1592 } 1593 set _ignoreRangeUpdate 0 1580 if { $_settings(-customrange) } { 1581 set vmin [$itk_component(min) value] 1582 set vmax [$itk_component(max) value] 1583 } else { 1584 foreach { vmin vmax } $_limits($_curFldName) break 1585 } 1586 GenerateContourList 1587 SendCmd [list contour3d contourlist $_contourList(values)] 1588 SendCmd "dataset maprange explicit $vmin $vmax $_curFldName" 1589 DrawLegend 1594 1590 } 1595 1591 "-xcutplanevisible" - "-ycutplanevisible" - "-zcutplanevisible" { … … 1817 1813 -text "Use Custom Range:" \ 1818 1814 -variable [itcl::scope _settings(-customrange)] \ 1815 -command [itcl::code $this ToggleCustomRange] \ 1819 1816 -font "Arial 9" 1820 1817 } 1821 # use a trace so we can adjust the value of our variable1822 # and still have the ToggleCustomRange command called,1823 # which doesn't seem to happen when using -command.1824 trace add variable _settings(-customrange) write \1825 [itcl::code $this ToggleCustomRange]1826 1818 1827 1819 itk_component add l_min { … … 2917 2909 # only set custom range if value changed 2918 2910 if {[$itk_component($which) value] != $value} { 2919 # turn on crange first to enable and update the gauge, 2920 # then change the value in the gauge 2911 # set the flag stating the custom range came from the legend 2912 # change the value in the gauge 2913 # turn on crange to enable the labels and gauges 2914 # call AdjustSetting -range (inside ToggleCustomRange) 2915 # to update drawing and legend 2921 2916 set _customRangeClick 0 2917 $itk_component($which) value $value 2922 2918 $itk_component(crange) select 2923 $itk_component($which) value $value2919 ToggleCustomRange 2924 2920 } 2925 2921 } … … 2949 2945 # ---------------------------------------------------------------------- 2950 2946 itcl::body Rappture::VtkIsosurfaceViewer::ToggleCustomRange {args} { 2951 2952 2947 if { ! $_settings(-customrange) } { 2953 2948 # custom range was turned off
Note: See TracChangeset
for help on using the changeset viewer.