Ignore:
Timestamp:
Jul 20, 2010, 4:14:35 PM (14 years ago)
Author:
gah
Message:

removed -tkwait flag to molvisviewer addmethod

File:
1 edited

Legend:

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

    r1837 r1839  
    200200        -description ""
    201201        -param ""
    202         -tkwait no
    203202    }
    204203    foreach {opt val} $settings {
     
    355354        -command [itcl::code $this pause]
    356355
     356    global readyForNextFrame
     357    set readyForNextFrame 1;            # By default, always ready
    357358    # schedule the first frame
    358359    set delay [expr {int(ceil(pow($_play(speed)/10.0+2,2.0)*15))}]
     
    371372        set _afterId ""
    372373    }
     374    global readyForNextFrame
     375    set readyForNextFrame 1;            # By default, always ready
    373376
    374377    # toggle the button to "play" mode
     
    527530# ----------------------------------------------------------------------
    528531itcl::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    }
    544551    set _afterId [after $delay [itcl::code $this _playFrame]]
    545552}
     
    568575    $itk_component(eleLabel) configure -text "[$_topmost label $_pos]"
    569576    foreach dataobj [$_topmost value $_pos] {
    570         set settings "-color autoreset -width 2 -tkwait yes"
     577        set settings "-color autoreset -width 2"
    571578        if {[catch {$dataobj hints style} style] == 0} {
    572579            eval lappend settings $style
Note: See TracChangeset for help on using the changeset viewer.