Changeset 1807 for branches/blt4/gui/scripts
- Timestamp:
- Jul 14, 2010, 3:54:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4/gui/scripts/molvisviewer.tcl
r1795 r1807 53 53 private variable _obj2models; # array containing list of models 54 54 # for each data object. 55 55 private variable _waitForImage 0 56 56 private variable _view 57 57 private variable _click … … 678 678 set count 0 679 679 itcl::body Rappture::MolvisViewer::ReceiveImage { size cacheid frame rock } { 680 set _waitForImage 0; # Turn off wait loop. 680 681 set tag "$frame,$rock" 681 682 global count … … 769 770 } 770 771 if {"" != $data1} { 772 # Save the PDB data in case the user wants to later save it. 771 773 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 773 780 set _dataobjs($model-$state) 1 774 781 } … … 776 783 set data2 [$dataobj get components.molecule.pdb] 777 784 if {"" != $data2} { 785 # Save the PDB data in case the user wants to later save it. 778 786 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 780 793 set _dataobjs($model-$state) 1 781 794 } … … 820 833 } 821 834 if {"" != $data3} { 835 # Save the PDB data in case the user wants to later save it. 822 836 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 825 843 } 844 set _dataobjs($model-$state) 1 826 845 } 827 846 } … … 934 953 if { $flush } { 935 954 SendCmd "bmp"; # Flush the results. 955 set _waitForImage 1 936 956 } 937 957 set _buffering 0; # Turn off buffering. … … 945 965 blt::busy release $itk_component(hull) 946 966 967 if { $_waitForImage } { 968 tkwait variable [itcl::scope _waitForImage] 969 } 947 970 debug "exiting rebuild" 948 971 } … … 1441 1464 } 1442 1465 } 1466 update idletasks 1467 update 1443 1468 } 1444 1469
Note: See TracChangeset
for help on using the changeset viewer.