Changeset 3462 for trunk/gui/scripts
- Timestamp:
- Mar 5, 2013, 11:29:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkheightmapviewer.tcl
r3461 r3462 215 215 axisZGrid 0 216 216 colormapVisible 1 217 colormapDiscrete 0 217 218 edges 0 218 219 field "Default" … … 1350 1351 } 1351 1352 SetCurrentColormap $color 1353 if {$_settings(colormapDiscrete)} { 1354 set numColors [expr $_settings(numIsolines) - 1] 1355 SendCmd "colormap res $numColors $color" 1356 } 1352 1357 } 1353 1358 #SendCmd "heightmap colormode scalar $_curFldName" … … 1359 1364 set bool $_settings($what) 1360 1365 SendCmd "heightmap surface $bool" 1366 } 1367 "colormapDiscrete" { 1368 set bool $_settings($what) 1369 set numColors [expr $_settings(numIsolines) - 1] 1370 StartBufferingCommands 1371 if {$bool} { 1372 SendCmd "colormap res $numColors" 1373 } else { 1374 SendCmd "colormap res default" 1375 } 1376 SendCmd "heightmap preinterp $bool" 1377 StopBufferingCommands 1378 EventuallyRequestLegend 1361 1379 } 1362 1380 "edges" { … … 1530 1548 set _currentNumIsolines $_settings(numIsolines) 1531 1549 SendCmd "heightmap numcontours $_settings(numIsolines)" 1532 DrawLegend 1550 if {$_settings(colormapDiscrete)} { 1551 set numColors [expr $_settings(numIsolines) - 1] 1552 SendCmd "colormap res $numColors" 1553 EventuallyRequestLegend 1554 } else { 1555 DrawLegend 1556 } 1533 1557 } 1534 1558 "opacity" { … … 1789 1813 -font "Arial 9" 1790 1814 1815 checkbutton $inner.colormapDiscrete \ 1816 -text "Discrete Colormap" \ 1817 -variable [itcl::scope _settings(colormapDiscrete)] \ 1818 -command [itcl::code $this AdjustSetting colormapDiscrete] \ 1819 -font "Arial 9" 1820 1791 1821 itk_component add field_l { 1792 1822 label $inner.field_l -text "Field" -font "Arial 9" … … 1905 1935 6,0 $inner.edges -anchor w -pady 2 -cspan 2 \ 1906 1936 7,0 $inner.legend -anchor w -pady 2 -cspan 2 \ 1907 8,0 $inner.wireframe -anchor w -pady 2 -cspan 2\ 1908 9,0 $inner.outline -anchor w -pady 2 -cspan 2 \ 1909 10,0 $inner.isolines -anchor w -pady 2 -cspan 2 \ 1910 11,0 $inner.separator -padx 2 -fill x -cspan 2 \ 1911 12,0 $inner.lighting -anchor w -pady 2 -cspan 2 \ 1912 13,0 $inner.opacity_l -anchor w -pady 2 \ 1913 13,1 $inner.opacity -fill x -pady 2 \ 1914 14,0 $inner.scale_l -anchor w -pady 2 -cspan 2 \ 1915 14,1 $inner.scale -fill x -pady 2 -cspan 2 \ 1937 8,0 $inner.colormapDiscrete -anchor w -pady 2 -cspan 2 \ 1938 9,0 $inner.wireframe -anchor w -pady 2 -cspan 2\ 1939 10,0 $inner.outline -anchor w -pady 2 -cspan 2 \ 1940 11,0 $inner.isolines -anchor w -pady 2 -cspan 2 \ 1941 12,0 $inner.separator -padx 2 -fill x -cspan 2 \ 1942 13,0 $inner.lighting -anchor w -pady 2 -cspan 2 \ 1943 14,0 $inner.opacity_l -anchor w -pady 2 \ 1944 14,1 $inner.opacity -fill x -pady 2 \ 1945 15,0 $inner.scale_l -anchor w -pady 2 -cspan 2 \ 1946 15,1 $inner.scale -fill x -pady 2 -cspan 2 \ 1916 1947 1917 1948 blt::table configure $inner r* c* -resize none 1918 blt::table configure $inner r1 5c1 -resize expand1949 blt::table configure $inner r16 c1 -resize expand 1919 1950 } 1920 1951 … … 2177 2208 if { $_currentNumIsolines != $style(-levels) } { 2178 2209 set _currentNumIsolines $style(-levels) 2210 set _settings(numIsolines) $_currentNumIsolines 2179 2211 DrawLegend 2180 2212 }
Note: See TracChangeset
for help on using the changeset viewer.