Changeset 1839 for trunk/gui/scripts/sequenceresult.tcl
- Timestamp:
- Jul 20, 2010, 4:14:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/sequenceresult.tcl
r1837 r1839 200 200 -description "" 201 201 -param "" 202 -tkwait no203 202 } 204 203 foreach {opt val} $settings { … … 355 354 -command [itcl::code $this pause] 356 355 356 global readyForNextFrame 357 set readyForNextFrame 1; # By default, always ready 357 358 # schedule the first frame 358 359 set delay [expr {int(ceil(pow($_play(speed)/10.0+2,2.0)*15))}] … … 371 372 set _afterId "" 372 373 } 374 global readyForNextFrame 375 set readyForNextFrame 1; # By default, always ready 373 376 374 377 # toggle the button to "play" mode … … 527 530 # ---------------------------------------------------------------------- 528 531 itcl::body Rappture::SequenceResult::_playFrame {} { 529 set _pos [expr {$_pos+1}] 530 set last [expr {[llength $_indices]-1}] 531 532 if {$_pos > $last} { 533 if {$_play(loop)} { 534 set _pos 0 535 } else { 536 set _pos $last 537 pause 538 return 539 } 540 } 541 goto $_pos 542 543 set delay [expr {int(ceil(pow($_play(speed)/10.0+2,2.0)*15))}] 532 global readyForNextFrame 533 if { $readyForNextFrame } { 534 set _pos [expr {$_pos+1}] 535 set last [expr {[llength $_indices]-1}] 536 537 if {$_pos > $last} { 538 if {$_play(loop)} { 539 set _pos 0 540 } else { 541 set _pos $last 542 pause 543 return 544 } 545 } 546 goto $_pos 547 set delay [expr {int(ceil(pow($_play(speed)/10.0+2,2.0)*15))}] 548 } else { 549 set delay 50; # Poll for completion 550 } 544 551 set _afterId [after $delay [itcl::code $this _playFrame]] 545 552 } … … 568 575 $itk_component(eleLabel) configure -text "[$_topmost label $_pos]" 569 576 foreach dataobj [$_topmost value $_pos] { 570 set settings "-color autoreset -width 2 -tkwait yes"577 set settings "-color autoreset -width 2" 571 578 if {[catch {$dataobj hints style} style] == 0} { 572 579 eval lappend settings $style
Note: See TracChangeset
for help on using the changeset viewer.