- Timestamp:
- Mar 4, 2013 11:31:22 AM (11 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/field.tcl
r3429 r3445 1203 1203 if { $label == "" } { 1204 1204 set label $cname 1205 if { [regexp {component\((.*)\)} $label match subname] } {1206 set label $subname1207 }1208 1205 } 1209 1206 regsub -all { } $label {_} label … … 1240 1237 set element [$_xmlobj element -as type $path] 1241 1238 set name $cname 1242 if { [regexp {component\((.*)\)} $name match subname] } {1243 set name $subname1244 }1245 1239 regsub -all { } $name {_} name 1246 1240 set _field2Label($name) $name -
trunk/gui/scripts/visviewer.tcl
r3422 r3445 54 54 protected variable _debugConsole 0 55 55 protected variable _reportClientInfo 1 56 protected variable _showWaitDialog 1 56 57 57 58 constructor { servers args } { … … 76 77 private method SendDebugCommand {} 77 78 79 protected method EnableWaitDialog { bool } 78 80 protected method StartBufferingCommands {} 79 81 protected method StopBufferingCommands {} … … 459 461 # Read some number of bytes from the visualization server. 460 462 # 463 461 464 itcl::body Rappture::VisViewer::StartWaiting {} { 462 after cancel $_afterId 463 set _afterId [after 2000 [itcl::code $this SplashScreen on]] 465 if { $_showWaitDialog } { 466 after cancel $_afterId 467 set _afterId [after 2000 [itcl::code $this SplashScreen on]] 468 } 464 469 } 465 470 466 471 itcl::body Rappture::VisViewer::StopWaiting {} { 467 SplashScreen off 472 if { $_showWaitDialog } { 473 SplashScreen off 474 } 475 } 476 477 itcl::body Rappture::VisViewer::EnableWaitDialog { bool } { 478 set _showWaitDialog $bool 468 479 } 469 480 -
trunk/gui/scripts/vtkheightmapviewer.tcl
r3444 r3445 189 189 $_parser alias viserror [itcl::code $this ReceiveError] 190 190 191 EnableWaitDialog no 192 191 193 # Initialize the view to some default parameters. 192 194 array set _view { … … 996 998 if { $label == "" } { 997 999 if {$axis == "z"} { 998 if { $_curFldName == "component"} {1000 if { [string match "component*" $_curFldName] } { 999 1001 set label [string toupper $axis] 1000 1002 } else { … … 1377 1379 set label [$_first hints zlabel] 1378 1380 if { $label == "" } { 1379 if { $_curFldName == "component"} {1381 if { [string match "component*" $_curFldName] } { 1380 1382 set label Z 1381 1383 } else { … … 1586 1588 1587 1589 set fname $_curFldName 1588 if { $fname == "component"} {1590 if { [string match "component*" $fname] } { 1589 1591 set title "" 1590 1592 } else { … … 1620 1622 # 1621 1623 itcl::body Rappture::VtkHeightmapViewer::ResetAxes {} { 1622 if { ![info exists _ fields($_curFldName)]} {1624 if { ![info exists _limits($_curFldName)]} { 1623 1625 SendCmd "dataset maprange all" 1624 1626 SendCmd "axis autorange z on" … … 2210 2212 set lineht [font metrics $font -linespace] 2211 2213 2212 if { $fname == "component"} {2214 if { [string match "component*" $fname] } { 2213 2215 set title "" 2214 2216 } else { … … 2362 2364 set iy [expr $y - ($lineht + 2)] 2363 2365 2364 if { $fname == "component"} {2366 if { [string match "component*" $fname] } { 2365 2367 set title "" 2366 2368 } else { -
trunk/gui/scripts/vtkisosurfaceviewer.tcl
r3443 r3445 165 165 package require vtk 166 166 set _serverType "vtkvis" 167 168 EnableWaitDialog no 167 169 168 170 # Rebuild event … … 1048 1050 if { $label == "" } { 1049 1051 if {$axis == "z"} { 1050 if { $_curFldName == "component"} {1052 if { [string match "component*" $_curFldName] } { 1051 1053 set label [string toupper $axis] 1052 1054 } else { … … 1519 1521 # 1520 1522 itcl::body Rappture::VtkIsosurfaceViewer::RequestLegend {} { 1523 if { ![info exists _fields($_curFldName)] } { 1524 return 1525 } 1526 set fname $_curFldName 1521 1527 set _legendPending 0 1522 1528 set font "Arial 8" … … 1528 1534 return 1529 1535 } 1530 if { [info exists _fields($_curFldName)] } { 1531 set title [lindex $_fields($_curFldName) 0] 1532 if { $title != "component" } { 1533 set h [expr $h - ($lineht + 2)] 1536 if { [string match "component*" $fname] } { 1537 set title "" 1538 } else { 1539 if { [info exists _fields($fname)] } { 1540 foreach { title units } $_fields($fname) break 1541 if { $units != "" } { 1542 set title [format "%s (%s)" $title $units] 1543 } 1544 } else { 1545 set title $fname 1534 1546 } 1535 } else { 1536 return 1547 } 1548 # If there's a title too, substract one more line 1549 if { $title != "" } { 1550 incr h -$lineht 1537 1551 } 1538 1552 # Set the legend on the first heightmap dataset. 1539 1553 if { $_currentColormap != "" } { 1540 1554 set cmap $_currentColormap 1541 SendCmdNoWait "legend $cmap scalar $ title {} $w $h 0"1555 SendCmdNoWait "legend $cmap scalar $_curFldName {} $w $h 0" 1542 1556 } 1543 1557 } … … 2200 2214 set iy [expr $y - ($lineht + 2)] 2201 2215 2202 if { $fname == "component"} {2216 if { [string match "component*" $fname] } { 2203 2217 set title "" 2204 2218 } else { … … 2317 2331 set lineht [font metrics $font -linespace] 2318 2332 2319 if { $fname == "component"} {2333 if { [string match "component*" $fname] } { 2320 2334 set title "" 2321 2335 } else {
Note: See TracChangeset
for help on using the changeset viewer.