Ignore:
Timestamp:
May 16, 2007, 7:37:45 PM (17 years ago)
Author:
mmc
Message:

Fixed a problem recently introduced with device structures on the
input side. app-rtd was having trouble changing the structure when
you changed devices via the loader.

Fix for support ticket #1631 'can't read "_axis(click-x)": no such
variable'. Added some code to guard against the case when release
gets called somehow before click.

Fix for support ticket #1688 'can't use empty string as operand of "-"'
Fix for support ticket #1689 'divide by zero'
Fix for support ticket #1707 'can't read "_dobj2cols(-energy)":
no such element in array'
All of these fixes had to do with the energy viewer, particularly
in the case where there was only 1 energy level, so the homo/lumo
levels could not be displayed.

Fix for support ticket #1704 'impossible limits (min 1.58489 >=
max 6.30957e-05)'
Added some code to guard against setting limits where min >= max.

File:
1 edited

Legend:

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

    r676 r738  
    362362        }
    363363    }
     364
     365    if {"" != $_emin && $_emin == $_emax} {
     366        set _emin [expr {$_emin-0.1}]
     367        set _emax [expr {$_emax+0.1}]
     368    }
     369
    364370    set _eviewmin ""  ;# reset zoom view
    365371    set _eviewmax ""
     
    471477                set _ehomo [lindex $elist $nhomo]
    472478                set _elumo [lindex $elist $nlumo]
    473                 set gap [expr {$_elumo - $_ehomo}]
    474                 set _edefmin [expr {$_ehomo - 0.3*$gap}]
    475                 set _edefmax [expr {$_elumo + 0.3*$gap}]
    476 
    477                 set y [expr {($_ehomo-$_emin)*$e2y + $yzoom0}]
    478                 set id [$c create rectangle $xx0 $y $xx1 $y0 \
    479                     -stipple [Rappture::icon rdiag] \
    480                     -outline "" -fill $itk_option(-shadecolor)]
    481                 $c lower $id
     479                if {"" != $_elumo && "" != $_ehomo} {
     480                    set gap [expr {$_elumo - $_ehomo}]
     481                    set _edefmin [expr {$_ehomo - 0.3*$gap}]
     482                    set _edefmax [expr {$_elumo + 0.3*$gap}]
     483
     484                    set y [expr {($_ehomo-$_emin)*$e2y + $yzoom0}]
     485                    set id [$c create rectangle $xx0 $y $xx1 $y0 \
     486                        -stipple [Rappture::icon rdiag] \
     487                        -outline "" -fill $itk_option(-shadecolor)]
     488                    $c lower $id
     489                }
    482490            }
    483491        }
     
    543551        }
    544552
    545         if {"" != $_ehomo && "" != $_elumo} {
     553        if {"" != $topdobj && "" != $_ehomo && "" != $_elumo} {
    546554            set ecol $_dobj2cols($topdobj-energy)
    547555            set units [$topdobj columns -units $ecol]
Note: See TracChangeset for help on using the changeset viewer.