- Timestamp:
- Jan 4, 2015, 5:03:11 PM (10 years ago)
- Location:
- branches/1.3/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/gui/scripts/xylegend.tcl
r3800 r4918 85 85 private method Lower { args } 86 86 private method Raise { args } 87 private method Recolor {} 87 88 private method PopupMenu { x y } 88 89 private method Rename {} … … 158 159 delete "" 159 160 rename "" 161 recolor "" 160 162 } 161 163 foreach { but icon} $commands { … … 174 176 grid $controls.average -column 1 -row 1 -sticky w 175 177 grid $controls.rename -column 1 -row 2 -sticky w 176 grid $controls.delete -column 1 -row 3 -sticky w 178 grid $controls.recolor -column 1 -row 3 -sticky w 179 grid $controls.delete -column 1 -row 4 -sticky w 177 180 178 181 grid columnconfigure $controls 0 -weight 1 … … 613 616 } 614 617 } 618 619 itcl::body Rappture::XyLegend::Recolor {} { 620 set nodes [$itk_component(legend) curselection] 621 if { $nodes == "" } { 622 return 623 } 624 foreach node $nodes { 625 set elem [$_tree label $node] 626 if { $_lastColorIndex == 0 } { 627 set _lastColorIndex [llength $_autocolors] 628 } 629 incr _lastColorIndex -1 630 set color [lindex $_autocolors $_lastColorIndex] 631 $_graph element configure $elem -color $color 632 set im [$itk_component(legend) entry cget $node -icon] 633 $_graph legend icon $elem $im 634 } 635 } -
branches/1.3/gui/scripts/xyresult.tcl
r4205 r4918 250 250 if { $color == "auto" || $color == "autoreset" } { 251 251 if { $color == "autoreset" } { 252 set _nextColorIndex 0 252 puts stderr "autoreset _nextColorIndex=$_nextColorIndex" 253 # set _nextColorIndex 0 253 254 } 254 255 set color [lindex $itk_option(-autocolors) $_nextColorIndex] … … 1067 1068 } 1068 1069 } 1070 incr _nextColorIndex 1069 1071 if {$_nextColorIndex >= [llength $itk_option(-autocolors)]} { 1070 1072 set _nextColorIndex 0
Note: See TracChangeset
for help on using the changeset viewer.