Changeset 695 for trunk/gui/scripts
- Timestamp:
- May 3, 2007, 8:11:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/molvisviewer.tcl
r690 r695 78 78 private variable _mrepresentation "spheres" 79 79 private variable _cacheimage "" 80 private variable _busy 0 80 81 } 81 82 … … 286 287 itcl::body Rappture::MolvisViewer::destructor {} { 287 288 #puts stderr "MolvisViewer::destructor()" 289 image delete $_image(plot) 288 290 disconnect 289 291 } … … 320 322 # ---------------------------------------------------------------------- 321 323 itcl::body Rappture::MolvisViewer::connect {{hostlist ""}} { 324 #puts stderr "Rappture::MolvisViewer::connect($hostlist)" 325 322 326 if { "" != $hostlist } { set _hostlist $hostlist } 323 327 324 328 set hostlist $_hostlist 329 $_image(plot) blank 325 330 326 331 if ([isconnected]) { … … 332 337 } 333 338 334 blt::busy hold $itk_component(hull) ;339 blt::busy hold $itk_component(hull) -cursor watch 335 340 336 341 update idletasks … … 406 411 catch { after cancel $_rocker(afterid) } 407 412 catch { after cancel $_mevent(afterid) } 408 image delete $_image(plot)409 413 410 414 catch { … … 449 453 set w [winfo width $itk_component(3dview)] 450 454 set h [winfo height $itk_component(3dview)] 451 puts $_sid "screen - push$w $h"455 puts $_sid "screen -defer $w $h" 452 456 flush $_sid 453 457 $_dispatcher event -idle !rebuild … … 513 517 $_image(plot) put $_imagecache($tag) 514 518 set _image(id) $tag 515 $itk_component(3dview) configure -cursor "" 519 if { $_busy } { 520 $itk_component(3dview) configure -cursor "" 521 set _busy 0 522 } 516 523 update idletasks 517 524 break … … 542 549 set _inrebuild 1 543 550 set changed 0 551 set _busy 1 552 553 $itk_component(3dview) configure -cursor watch 544 554 545 555 # refresh GUI (primarily to make pending cursor changes visible) … … 635 645 _send enable -defer $obj 636 646 if { $_labels } { 637 _send label on647 _send label -defer on 638 648 } else { 639 _send label off649 _send label -defer off 640 650 } 641 651 set changed 1 … … 680 690 } else { 681 691 set _state(client) $state 682 $itk_component(3dview) configure -cursor ""683 692 _update 684 693 } … … 715 724 #puts stderr "Rappture::MolvisViewer::_configure($w $h)" 716 725 717 _send screen -push $w $h718 726 $_image(plot) configure -width $w -height $h 727 _send screen $w $h 719 728 } 720 729 … … 850 859 } 851 860 861 if { ![info exists _mevent(x)] } { 862 set option "click" 863 } 864 852 865 if { $option == "click" } { 853 866 $itk_component(3dview) configure -cursor fleur … … 855 868 856 869 if { $option == "drag" || $option == "release" } { 857 set diff [expr $now - $_mevent(time) ] 870 set diff 0 871 catch { set diff [expr $now - $_mevent(time) ] } 858 872 859 873 if {$diff < 75 && $option == "drag" } { # 75ms between motion updates … … 917 931 itcl::body Rappture::MolvisViewer::_serverDown {} { 918 932 #puts stderr "MolvisViewer::_serverDown()" 933 919 934 set x [expr {[winfo rootx $itk_component(area)]+10}] 920 935 set y [expr {[winfo rooty $itk_component(area)]+10}] 921 # this would automatically switch to vtk viewer: 922 # set parent [winfo parent $itk_component(hull)] 923 # $parent viewer vtk 936 924 937 Rappture::Tooltip::cue @$x,$y "Lost connection to visualization server. This happens sometimes when there are too many users and the system runs out of memory.\n\nTo reconnect, reset the view or press any other control. Your picture should come right back up." 925 938 } … … 1081 1094 set _dobj2raise($dataobj) $params(-raise) 1082 1095 1083 $itk_component(3dview) configure -cursor watch1084 1096 $_dispatcher event -idle !rebuild 1085 1097 } … … 1139 1151 # if anything changed, then rebuild the plot 1140 1152 if {$changed} { 1141 $itk_component(3dview) configure -cursor watch1142 1153 $_dispatcher event -idle !rebuild 1143 1154 }
Note: See TracChangeset
for help on using the changeset viewer.