Changeset 3445 for trunk


Ignore:
Timestamp:
Mar 4, 2013 11:31:22 AM (11 years ago)
Author:
gah
Message:

remove test for component attribute names, disable wait dialog for vtkheightmap and vtkisosurface viewers

Location:
trunk/gui/scripts
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/field.tcl

    r3429 r3445  
    12031203        if { $label == "" } {
    12041204            set label $cname
    1205             if { [regexp {component\((.*)\)} $label match subname] } {
    1206                 set label $subname
    1207             }
    12081205        }
    12091206        regsub -all { } $label {_} label
     
    12401237    set element [$_xmlobj element -as type $path]
    12411238    set name $cname
    1242     if { [regexp {component\((.*)\)} $name match subname] } {
    1243         set name $subname
    1244     }
    12451239    regsub -all { } $name {_} name
    12461240    set _field2Label($name) $name
  • trunk/gui/scripts/visviewer.tcl

    r3422 r3445  
    5454    protected variable _debugConsole 0
    5555    protected variable _reportClientInfo 1
     56    protected variable _showWaitDialog 1
    5657
    5758    constructor { servers args } {
     
    7677    private method SendDebugCommand {}
    7778
     79    protected method EnableWaitDialog { bool }
    7880    protected method StartBufferingCommands {}
    7981    protected method StopBufferingCommands {}
     
    459461#    Read some number of bytes from the visualization server.
    460462#
     463
    461464itcl::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    }
    464469}
    465470
    466471itcl::body Rappture::VisViewer::StopWaiting {} {
    467     SplashScreen off
     472    if { $_showWaitDialog } {
     473        SplashScreen off
     474    }
     475}
     476
     477itcl::body Rappture::VisViewer::EnableWaitDialog { bool } {
     478    set _showWaitDialog $bool
    468479}
    469480
  • trunk/gui/scripts/vtkheightmapviewer.tcl

    r3444 r3445  
    189189    $_parser alias viserror [itcl::code $this ReceiveError]
    190190
     191    EnableWaitDialog no
     192
    191193    # Initialize the view to some default parameters.
    192194    array set _view {
     
    996998            if { $label == "" } {
    997999                if {$axis == "z"} {
    998                     if { $_curFldName == "component" } {
     1000                    if { [string match "component*" $_curFldName] } {
    9991001                        set label [string toupper $axis]
    10001002                    } else {
     
    13771379            set label [$_first hints zlabel]
    13781380            if { $label == "" } {
    1379                 if { $_curFldName == "component" } {
     1381                if { [string match "component*" $_curFldName] } {
    13801382                    set label Z
    13811383                } else {
     
    15861588
    15871589    set fname $_curFldName
    1588     if { $fname == "component" } {
     1590    if { [string match "component*" $fname] } {
    15891591        set title ""
    15901592    } else {
     
    16201622#
    16211623itcl::body Rappture::VtkHeightmapViewer::ResetAxes {} {
    1622     if { ![info exists _fields($_curFldName)]} {
     1624    if { ![info exists _limits($_curFldName)]} {
    16231625        SendCmd "dataset maprange all"
    16241626        SendCmd "axis autorange z on"
     
    22102212    set lineht [font metrics $font -linespace]
    22112213   
    2212     if { $fname == "component" } {
     2214    if { [string match "component*" $fname] } {
    22132215        set title ""
    22142216    } else {
     
    23622364    set iy [expr $y - ($lineht + 2)]
    23632365
    2364     if { $fname == "component" } {
     2366    if { [string match "component*" $fname] } {
    23652367        set title ""
    23662368    } else {
  • trunk/gui/scripts/vtkisosurfaceviewer.tcl

    r3443 r3445  
    165165    package require vtk
    166166    set _serverType "vtkvis"
     167
     168    EnableWaitDialog no
    167169
    168170    # Rebuild event
     
    10481050            if { $label == "" } {
    10491051                if {$axis == "z"} {
    1050                     if { $_curFldName == "component" } {
     1052                    if { [string match "component*" $_curFldName] } {
    10511053                        set label [string toupper $axis]
    10521054                    } else {
     
    15191521#
    15201522itcl::body Rappture::VtkIsosurfaceViewer::RequestLegend {} {
     1523    if { ![info exists _fields($_curFldName)] } {
     1524        return
     1525    }
     1526    set fname $_curFldName
    15211527    set _legendPending 0
    15221528    set font "Arial 8"
     
    15281534        return
    15291535    }
    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
    15341546        }
    1535     } else {
    1536         return
     1547    }
     1548    # If there's a title too, substract one more line
     1549    if { $title != "" } {
     1550        incr h -$lineht
    15371551    }
    15381552    # Set the legend on the first heightmap dataset.
    15391553    if { $_currentColormap != ""  } {
    15401554        set cmap $_currentColormap
    1541         SendCmdNoWait "legend $cmap scalar $title {} $w $h 0"
     1555        SendCmdNoWait "legend $cmap scalar $_curFldName {} $w $h 0"
    15421556    }
    15431557}
     
    22002214    set iy [expr $y - ($lineht + 2)]
    22012215
    2202     if { $fname == "component" } {
     2216    if { [string match "component*" $fname] } {
    22032217        set title ""
    22042218    } else {
     
    23172331    set lineht [font metrics $font -linespace]
    23182332   
    2319     if { $fname == "component" } {
     2333    if { [string match "component*" $fname] } {
    23202334        set title ""
    23212335    } else {
Note: See TracChangeset for help on using the changeset viewer.