- Timestamp:
- Mar 14, 2015, 6:40:50 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkheightmapviewer.tcl
r5134 r5137 139 139 private variable _changed 140 140 private variable _initialStyle ""; # First found style in dataobjects. 141 private variable _reset 1; # Indicates if camera needs to be reset142 # to starting position.143 private variable _beforeConnect 1; # Indicates if camera needs to be reset144 # to starting position.141 private variable _reset 1; # Indicates if the connection to the 142 # render server was reset 143 private variable _beforeConnect 1; # Indicates if we are in the constructor 144 # before the server connection is made 145 145 146 146 private variable _first "" ; # This is the topmost dataset. … … 1019 1019 } 1020 1020 } 1021 if { $_first != "" 1021 if { $_first != "" } { 1022 1022 $itk_component(field) choices delete 0 end 1023 1023 $itk_component(fieldmenu) delete 0 end … … 1055 1055 1056 1056 foreach axis { x y z } { 1057 if { $axis == "z" } { 1058 set label [$_first hints label] 1059 } else { 1060 set label [$_first hints ${axis}label] 1057 set label "" 1058 if { $_first != "" } { 1059 if { $axis == "z" } { 1060 set label [$_first hints label] 1061 } else { 1062 set label [$_first hints ${axis}label] 1063 } 1061 1064 } 1062 1065 if { $label == "" } { … … 1075 1078 1076 1079 set units "" 1077 if {$axis == "z" && [$_first hints ${axis}units] == ""} { 1078 if {$_curFldName != ""} { 1080 if { $_first != "" } { 1081 if { $axis == "z" } { 1082 set units [$_first hints units] 1083 } else { 1084 set units [$_first hints ${axis}units] 1085 } 1086 } 1087 if { $units == "" && $axis == "z" } { 1088 if { $_first != "" && [$_first hints zunits] != "" } { 1089 set units [$_first hints zunits] 1090 } elseif { [info exists _fields($_curFldName)] } { 1079 1091 set units [lindex $_fields($_curFldName) 1] 1080 1092 } 1081 } else { 1082 set units [$_first hints ${axis}units] 1083 } 1084 if { $units != "" } { 1085 # May be a space in the axis units. 1086 SendCmd [list axis units $axis $units] 1087 } 1093 } 1094 # May be a space in the axis units. 1095 SendCmd [list axis units $axis $units] 1088 1096 } 1089 1097 # … … 1462 1470 return 1463 1471 } 1464 set label [$_first hints label] 1472 set label "" 1473 if { $_first != "" } { 1474 set label [$_first hints label] 1475 } 1465 1476 if { $label == "" } { 1466 1477 if { [string match "component*" $_curFldName] } { … … 1473 1484 SendCmd [list axis name z $label] 1474 1485 1475 if { [$_first hints zunits] == "" } { 1476 set units [lindex $_fields($_curFldName) 1] 1477 } else { 1478 set units [$_first hints zunits] 1479 } 1480 if { $units != "" } { 1481 # May be a space in the axis units. 1482 SendCmd [list axis units z $units] 1483 } 1486 set units "" 1487 if { $_first != "" } { 1488 set units [$_first hints units] 1489 } 1490 if { $units == "" } { 1491 if { $_first != "" && [$_first hints zunits] != "" } { 1492 set units [$_first hints zunits] 1493 } elseif { [info exists _fields($_curFldName)] } { 1494 set units [lindex $_fields($_curFldName) 1] 1495 } 1496 } 1497 # May be a space in the axis units. 1498 SendCmd [list axis units z $units] 1484 1499 # Get the new limits because the field changed. 1485 1500 ResetAxes … … 1721 1736 if { $_currentColormap != "" } { 1722 1737 set cmap $_currentColormap 1738 if { ![info exists _colormaps($cmap)] } { 1739 BuildColormap $cmap 1740 set _colormaps($name) 1 1741 } 1723 1742 #SendCmd "legend $cmap scalar $_curFldName {} $w $h 0" 1724 1743 SendCmd "legend2 $cmap $w $h"
Note: See TracChangeset
for help on using the changeset viewer.