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

Legend:

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

    r2848 r3054  
    937937        }
    938938    }
     939    SendCmd "dataset maprange visible"
    939940       
    940941    set _buffering 0;                        # Turn off buffering.
     
    13411342    set clist [split $style(-color) :]
    13421343    set cmap {}
    1343     for {set i 0} {$i < [llength $clist]} {incr i} {
    1344         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        }
    13451350        set color [lindex $clist $i]
    13461351        append cmap "$x [Color2RGB $color] "
Note: See TracChangeset for help on using the changeset viewer.