Ignore:
Timestamp:
Jul 14, 2010, 3:54:10 PM (14 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

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

    r1795 r1807  
    5353    private variable _obj2models;       # array containing list of models
    5454                                        # for each data object.
    55 
     55    private variable _waitForImage 0
    5656    private variable _view
    5757    private variable _click
     
    678678set count 0
    679679itcl::body Rappture::MolvisViewer::ReceiveImage { size cacheid frame rock } {
     680    set _waitForImage 0;                # Turn off wait loop.
    680681    set tag "$frame,$rock"
    681682    global count
     
    769770            }
    770771            if {"" != $data1} {
     772                # Save the PDB data in case the user wants to later save it.
    771773                set _pdbdata $data1
    772                 SendCmd "loadpdb -defer \"$data1\" $model $state"
     774                set nBytes [string length $data1]
     775
     776                # We know we're buffered here, so append the "loadpdb" command
     777                # with the data payload immediately afterwards.
     778                append _outbuf "loadpdb -defer $nBytes $model $state\n"
     779                append _outbuf $data1
    773780                set _dataobjs($model-$state)  1
    774781            }
     
    776783            set data2 [$dataobj get components.molecule.pdb]
    777784            if {"" != $data2} {
     785                # Save the PDB data in case the user wants to later save it.
    778786                set _pdbdata $data2
    779                 SendCmd "loadpdb -defer \"$data2\" $model $state"
     787                set nBytes [string length $data2]
     788
     789                # We know we're buffered here, so append the "loadpdb" command
     790                # with the data payload immediately afterwards.
     791                append _outbuf "loadpdb -defer $nBytes $model $state\n"
     792                append _outbuf $data2
    780793                set _dataobjs($model-$state)  1
    781794            }
     
    820833                }
    821834                if {"" != $data3} {
     835                    # Save the PDB data in case the user wants to later save it.
    822836                    set _pdbdata $data3
    823                     SendCmd "loadpdb -defer \"$data3\" $model $state"
    824                     set _dataobjs($model-$state) 1
     837                    set nBytes [string length $data3]
     838
     839                    # We know we're buffered here, so append the "loadpdb"
     840                    # command with the data payload immediately afterwards.
     841                    append _outbuf "loadpdb -defer $nBytes $model $state\n"
     842                    append _outbuf $data3
    825843                }
     844                set _dataobjs($model-$state) 1
    826845            }
    827846        }
     
    934953    if { $flush } {
    935954        SendCmd "bmp";                  # Flush the results.
     955        set _waitForImage 1
    936956    }
    937957    set _buffering 0;                   # Turn off buffering.
     
    945965    blt::busy release $itk_component(hull)
    946966
     967    if { $_waitForImage } {
     968        tkwait variable [itcl::scope _waitForImage]
     969    }
    947970    debug "exiting rebuild"
    948971}
     
    14411464        }
    14421465    }
     1466    update idletasks
     1467    update
    14431468}
    14441469
Note: See TracChangeset for help on using the changeset viewer.