Changeset 3055 for branches/blt4


Ignore:
Timestamp:
Jun 21, 2012 3:29:04 PM (12 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/gui/scripts/vtkviewer.tcl

    r2791 r3055  
    925925            array set view $location
    926926        }
    927     }
    928     foreach axis { x y z } {
    929         set label [$_first hints ${axis}label]
    930         if { $label != "" } {
    931             SendCmd "axis name $axis $label"
    932         }
    933         set units [$_first hints ${axis}units]
    934         if { $units != "" } {
    935             SendCmd "axis units $axis $units"
    936         }
    937     }
     927
     928        foreach axis { x y z } {
     929            set label [$_first hints ${axis}label]
     930            if { $label != "" } {
     931                SendCmd "axis name $axis $label"
     932            }
     933            set units [$_first hints ${axis}units]
     934            if { $units != "" } {
     935                SendCmd "axis units $axis $units"
     936            }
     937        }
     938    }
     939    SendCmd "dataset maprange visible"
    938940       
    939941    set _buffering 0;                        # Turn off buffering.
     
    12831285        if { [info exists _dataset2style($dataset)] } {
    12841286            #puts stderr "RequestLegend w=$w h=$h"
    1285             SendCmd "legend $_dataset2style($dataset) vmag {} $w $h 0"
     1287            SendCmd "legend $_dataset2style($dataset) vmag {} {} $w $h 0"
    12861288            break;
    12871289        }
     
    13401342    set clist [split $style(-color) :]
    13411343    set cmap {}
    1342     for {set i 0} {$i < [llength $clist]} {incr i} {
    1343         set x [expr {double($i)/([llength $clist]-1)}]
     1344    set numColors [llength $clist]
     1345    for {set i 0} {$i < $numColors} {incr i} {
     1346        set x 0
     1347        if { $numColors > 1 } {
     1348            set x [expr {double($i)/($numColors-1)}]
     1349        }
    13441350        set color [lindex $clist $i]
    13451351        append cmap "$x [Color2RGB $color] "
Note: See TracChangeset for help on using the changeset viewer.