--- ray/src/util/do_options.tcl 1994/12/05 14:29:46 2.3 +++ ray/src/util/do_options.tcl 2003/02/22 02:07:30 2.8 @@ -1,21 +1,21 @@ -# SCCSid "$SunId$ LBL" +# RCSid: $Id: do_options.tcl,v 2.8 2003/02/22 02:07:30 greg Exp $ # # Options screen for trad # proc amb_delete {} { # delete ambient file global radvar curmess - if {"$radvar(AMBFILE)" == {} || ! [file exists $radvar(AMBFILE)]} { + if {"$radvar(AMBFILE)" == {} || ! [file isfile $radvar(AMBFILE)]} { set curmess {No ambient file.} return } set hl [string length [exec getinfo < $radvar(AMBFILE)]] set fl [file size $radvar(AMBFILE)] - set nv [expr ($fl - $hl - 3) / 75] - if {$nv && [tk_dialog .dlg {Verification} \ + set nv [expr ($fl - $hl - 2) / 75] + if {$nv > 50 && [tk_dialog .dlg {Verification} \ "Really delete ambient file $radvar(AMBFILE)\ with $nv indirect irradiance values?" \ - questhead 1 {Delete} {Cancel}]} { + questhead 0 {Delete} {Cancel}]} { return 0 } if [catch {exec rm $radvar(AMBFILE) < /dev/null} curmess] {return 0} @@ -110,7 +110,7 @@ proc do_options w { # Set up options screen -anchor se helplink $w.revert trad options revert button $w.copy -text Copy -relief raised -command {getfile -grab \ - -send copyopts -view view_txt -glob $rif_glob} + -send copyopts -view view_txt -glob $myglob(rif)} place $w.copy -relwidth .1071 -relheight .0610 -relx .98 -rely .90 \ -anchor se helplink $w.copy trad options copy