Ignore:
Timestamp:
Feb 14, 2006, 12:52:18 PM (19 years ago)
Author:
mmc
Message:

Fixed the download button so that it doesn't force the
analyzer screen to be too big, and so that it disappears
gracefully when squeezed out.

Fixed the molecule viewer so that it handles the case
where one molecule is empty and another is not, and
they're being compared with the comparison dial. Was
chocking on the empty molecule with no xmin/xmax set.

File:
1 edited

Legend:

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

    r115 r172  
    448448    set zp [expr {cos($theta*$deg2rad)}]
    449449
    450     set xm [expr {0.5*($_limits(xmax)+$_limits(xmin))}]
    451     set ym [expr {0.5*($_limits(ymax)+$_limits(ymin))}]
    452     set zm [expr {0.5*($_limits(zmax)+$_limits(zmin))}]
     450    set blank 0
     451    foreach lim {xmin xmax ymin ymax zmin zmax} {
     452        if {"" == $_limits($lim)} {
     453            set blank 1
     454            break
     455        }
     456    }
     457    if {$blank} {
     458        set xm 0
     459        set ym 0
     460        set zm 0
     461    } else {
     462        set xm [expr {0.5*($_limits(xmax)+$_limits(xmin))}]
     463        set ym [expr {0.5*($_limits(ymax)+$_limits(ymin))}]
     464        set zm [expr {0.5*($_limits(zmax)+$_limits(zmin))}]
     465    }
    453466
    454467    set cam [$this-ren GetActiveCamera]
Note: See TracChangeset for help on using the changeset viewer.