summaryrefslogtreecommitdiffstats
path: root/ds9/library/header.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-04-10 21:24:12 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-04-10 21:24:12 (GMT)
commitb4a7cb80b5de39988bafee95af43885e9027de8e (patch)
treed6e363f83abc796719b4dba9a849157c2bee8ca9 /ds9/library/header.tcl
parentdcfe13a27708c98e350f04f90285b705c88596fe (diff)
downloadblt-b4a7cb80b5de39988bafee95af43885e9027de8e.zip
blt-b4a7cb80b5de39988bafee95af43885e9027de8e.tar.gz
blt-b4a7cb80b5de39988bafee95af43885e9027de8e.tar.bz2
restore non parser cmd code
Diffstat (limited to 'ds9/library/header.tcl')
-rw-r--r--ds9/library/header.tcl21
1 files changed, 18 insertions, 3 deletions
diff --git a/ds9/library/header.tcl b/ds9/library/header.tcl
index 443ad06..6762bea 100644
--- a/ds9/library/header.tcl
+++ b/ds9/library/header.tcl
@@ -168,14 +168,29 @@ proc ProcessHeaderCmd {varname iname} {
if {$current(frame) != {}} {
switch -- $item {
close {
- CloseHeaderCmd $jj
+ set vvarname "hd[string range $current(frame) end end]-$jj"
+ upvar #0 $vvarname vvar
+ global $vvarname
+
+ if {[info exists vvar(top)]} {
+ SimpleTextDestroy $vvarname
+ }
incr i -1
}
save {
- SaveHeaderCmd $jj [lindex $var $i]
+ set fn [lindex $var $i]
+ if {$fn != {}} {
+ if {[catch {set ch [open "| cat > \"$fn\"" w]}]} {
+ Error [msgcat::mc {An error has occurred while saving}]
+ return
+ }
+ puts -nonewline $ch [$current(frame) get fits header $jj]
+ close $ch
+ }
}
default {
- DisplayHeaderCmd $jj
+ catch {DisplayHeader $current(frame) $jj \
+ [$current(frame) get fits file name $jj]}
incr i -1
}
}