Changeset 738
- Timestamp:
- May 16, 2007 7:37:45 PM (17 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/deviceViewer1D.tcl
r729 r738 868 868 add $itk_option(-device) 869 869 } 870 after cancel [list catch [itcl::code $this _loadDevice]] 871 after idle [list catch [itcl::code $this _loadDevice]] 872 } 870 _loadDevice 871 } -
trunk/gui/scripts/energyLevels.tcl
r676 r738 362 362 } 363 363 } 364 365 if {"" != $_emin && $_emin == $_emax} { 366 set _emin [expr {$_emin-0.1}] 367 set _emax [expr {$_emax+0.1}] 368 } 369 364 370 set _eviewmin "" ;# reset zoom view 365 371 set _eviewmax "" … … 471 477 set _ehomo [lindex $elist $nhomo] 472 478 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 } 482 490 } 483 491 } … … 543 551 } 544 552 545 if {"" != $ _ehomo && "" != $_elumo} {553 if {"" != $topdobj && "" != $_ehomo && "" != $_elumo} { 546 554 set ecol $_dobj2cols($topdobj-energy) 547 555 set units [$topdobj columns -units $ecol] -
trunk/gui/scripts/field.tcl
r732 r738 349 349 set nv $value 350 350 } 351 if {![string is double -strict$nv]351 if {![string is double $nv] 352 352 || [regexp -nocase {^(inf|nan)$} $nv]} { 353 353 error "Value out of range" -
trunk/gui/scripts/gauge.tcl
r730 r738 234 234 switch -- $itk_option(-type) { 235 235 integer { 236 if {![string is integer -strict$nv]} {236 if {![string is integer $nv]} { 237 237 error "Should be an integer value" 238 238 } 239 239 } 240 240 real { 241 if {![string is double -strict$nv]241 if {![string is double $nv] 242 242 || [regexp -nocase {^(inf|nan)$} $nv]} { 243 243 error "Should be a real number" -
trunk/gui/scripts/xyresult.tcl
r736 r738 721 721 } 722 722 } 723 if {$min !=$max} {723 if {$min < $max} { 724 724 $g axis configure $axis -min $min -max $max 725 725 } else { … … 1010 1010 if {[llength $args] != 3} { 1011 1011 error "wrong # args: should be \"_axis drag axis x y\"" 1012 } 1013 if {![info exists _axis(moved)]} { 1014 return ;# must have skipped click event -- ignore 1012 1015 } 1013 1016 set axis [lindex $args 0] … … 1066 1069 error "wrong # args: should be \"_axis release axis x y\"" 1067 1070 } 1071 if {![info exists _axis(moved)]} { 1072 return ;# must have skipped click event -- ignore 1073 } 1068 1074 set axis [lindex $args 0] 1069 1075 set x [lindex $args 1] 1070 1076 set y [lindex $args 2] 1071 1077 1072 if {! [info exists _axis(moved)] || !$_axis(moved)} {1078 if {!$_axis(moved)} { 1073 1079 # small movement? then treat as click -- pop up axis editor 1074 1080 set dx [expr {abs($x-$_axis(click-x))}]
Note: See TracChangeset
for help on using the changeset viewer.