Changeset 5728 for branches/1.4


Ignore:
Timestamp:
Jun 22, 2015, 11:57:35 AM (9 years ago)
Author:
ldelgass
Message:

merge r5725:5726 from trunk

Location:
branches/1.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4

  • branches/1.4/gui/scripts/molvisviewer.tcl

    r5362 r5728  
    2626    Rappture::resources::register \
    2727        molvis_server Rappture::MolvisViewer::SetServerList
    28 }
    29 
    30 set debug 0
    31 proc debug { args } {
    32     global debug
    33     if { $debug } {
    34         puts stderr "[info level -1]: $args"
    35     }
    3628}
    3729
     
    159151itcl::body Rappture::MolvisViewer::constructor {servers args} {
    160152    set _serverType "pymol"
     153
     154    #DebugOn
    161155
    162156    # Register events to the dispatcher.  Base class expects !rebuild
     
    468462        }
    469463        set _dobj2raise($dataobj) $params(-raise)
    470         debug "setting parameters for $dataobj"
     464        DebugTrace "setting parameters for $dataobj"
    471465
    472466        if { [isconnected] } {
     
    726720
    727721itcl::body Rappture::MolvisViewer::SendCmd { cmd } {
    728     debug "cmd: ($cmd)"
     722    DebugTrace "cmd: ($cmd)"
    729723
    730724    if { $_state(server) != $_state(client) } {
     
    758752    }
    759753    set data [ReceiveBytes $size]
    760     #debug "success: reading $size bytes from proxy"
     754    #DebugTrace "success: reading $size bytes from proxy"
    761755    if { [string match "print*" $cacheid] } {
    762756        # $frame is the token that we sent to the proxy.
     
    765759    } else {
    766760        set _imagecache($tag) $data
    767         #debug "CACHED: $tag,$cacheid"
     761        #DebugTrace "CACHED: $tag,$cacheid"
    768762        $_image(plot) configure -data $data
    769763        set _image(id) $tag
     
    872866# ----------------------------------------------------------------------
    873867itcl::body Rappture::MolvisViewer::Rebuild {} {
    874     debug "Enter"
     868    DebugTrace "Enter"
    875869    set changed 0
    876870
     
    11191113        SendCmd "pan $_view(xpan) $_view(ypan)"
    11201114        SendCmd "zoom $_view(zoom)"
    1121         debug "rotate $_view(mx) $_view(my) $_view(mz)"
     1115        DebugTrace "rotate $_view(mx) $_view(my) $_view(mz)"
    11221116
    11231117        SendCmd "raw -defer {zoom complete=1}"
     
    11511145    blt::busy release $itk_component(hull)
    11521146
    1153     debug "Exit"
     1147    DebugTrace "Exit"
    11541148}
    11551149
     
    14301424        #SendCmd "rotate $mx $my $mz"
    14311425        EventuallyRotate $mx $my $mz
    1432         debug "rotate $_view(mx) $_view(my) $_view(mz)"
     1426        DebugTrace "rotate $_view(mx) $_view(my) $_view(mz)"
    14331427    }
    14341428    set _mevent(x) $x
     
    15271521                EventuallyRotate $a $b $c
    15281522                #SendCmd "rotate $a $b $c"
    1529                 debug "x,y: $x $y: rotate $_view(vx) $_view(vy) $_view(vz)"
     1523                DebugTrace "x,y: $x $y: rotate $_view(vx) $_view(vy) $_view(vz)"
    15301524                set _click(x) $x
    15311525                set _click(y) $y
     
    16921686    DoResize
    16931687    SendCmd "rotate $_view(mx) $_view(my) $_view(mz)"
    1694     debug "rotate $_view(mx) $_view(my) $_view(mz)"
     1688    DebugTrace "rotate $_view(mx) $_view(my) $_view(mz)"
    16951689    SendCmd "pan $_view(xpan) $_view(ypan)"
    16961690    SendCmd "zoom $_view(zoom)"
  • branches/1.4/gui/scripts/visviewer.tcl

    r5660 r5728  
    4343    #private variable _idleTimeout 0;       # No timeout
    4444
     45    protected variable _debug 0
    4546    protected variable _serverType "???";# Type of server.
    4647    protected variable _sid ""      ;   # socket connection to server
     
    8485    protected method ColorsToColormap { colors }
    8586    protected method Connect { servers }
     87    protected method DebugOff {} {
     88        set _debug 0
     89    }
     90    protected method DebugOn {} {
     91        set _debug 1
     92    }
     93    protected method DebugTrace { args } {
     94        if { $_debug } {
     95            puts stderr "[info level -1]: $args"
     96        }
     97    }
    8698    protected method DisableWaitDialog {}
    8799    protected method Disconnect {}
Note: See TracChangeset for help on using the changeset viewer.