--- ray/src/util/do_results3.6.tcl 1995/09/13 13:34:02 2.5 +++ ray/src/util/do_results3.6.tcl 1995/09/21 10:51:30 2.8 @@ -79,8 +79,8 @@ proc list_views {} { # List finished and unfinished p proc delpic {} { # Delete selected pictures global curmess - set selected_pics [get_selpics] - if {"$selected_pics" == {}} { + set selected_pics [get_selpics 1] + if {$selected_pics == {}} { set curmess "No pictures selected." return } @@ -95,21 +95,21 @@ proc delpic {} { # Delete selected pictures list_views } -proc get_selpics {} { # return selected pictures +proc get_selpics {{getall 0}} { # return selected pictures global fvwbox ufvwbox radvar rawfroot set sl {} foreach i [$fvwbox curselection] { testappend sl $radvar(PICTURE)_[$fvwbox get $i].pic - if {$rawfroot != $radvar(PICTURE)} { + if {$getall && $rawfroot != $radvar(PICTURE)} { testappend sl ${rawfroot}_[$fvwbox get $i].pic } - if {$radvar(ZFILE) != {}} { + if {$getall && $radvar(ZFILE) != {}} { testappend sl $radvar(ZFILE)_[$fvwbox get $i].zbf } } foreach i [$ufvwbox curselection] { testappend sl ${rawfroot}_[$ufvwbox get $i].unf - if {$radvar(ZFILE) != {}} { + if {$getall && $radvar(ZFILE) != {}} { testappend sl $radvar(ZFILE)_[$ufvwbox get $i].zbf } } @@ -119,26 +119,22 @@ proc get_selpics {} { # return selected pictures proc dsppic {} { # Display selected pictures global curmess dispcom radvar set selected_pics [get_selpics] - if {"$selected_pics" == {}} { + if {$selected_pics == {}} { set curmess "No pictures selected." return } - if {"$radvar(EXPOSURE)" == {}} { + if {$radvar(EXPOSURE) == {}} { set ev 0 } else { if [regexp {^[+-]} $radvar(EXPOSURE)] { - set ev $radvar(EXPOSURE) + set ev [expr {round($radvar(EXPOSURE))}] } else { - set ev [expr {log($radvar(EXPOSURE))/log(2)}] + set ev [expr {round(log($radvar(EXPOSURE))/log(2))}] } - if {$ev < 0} { - set ev [expr {int($ev - .5)}] - } else { - set ev [expr {int($ev + .5)}] - } } foreach p $selected_pics { - if [string match *.unf $p] { + if {[string match *.unf $p] || + $radvar(PICTURE) == $radvar(RAWFILE)} { set dc [format $dispcom $ev $p] } else { set dc [format $dispcom 0 $p] @@ -261,13 +257,13 @@ proc do_results w { # Results screen place $w.prte -relwidth .5714 -relheight .0610 -relx .3571 -rely .8537 helplink $w.prte trad results printcommand # Fill in views - if {[info exists radvar(RAWFILE)] && $radvar(RAWFILE) != {}} { + if {$radvar(RAWFILE) != {}} { set rawfroot $radvar(RAWFILE) + if {$radvar(RAWFILE) == $radvar(PICTURE)} { + set curmess "Warning: finished views are unfiltered" + } } else { set rawfroot $radvar(PICTURE) - } - if {! [info exists radvar(ZFILE)]} { - set radvar(ZFILE) {} } list_views }