summaryrefslogtreecommitdiffstats
path: root/ds9/library
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
parentdcfe13a27708c98e350f04f90285b705c88596fe (diff)
downloadblt-b4a7cb80b5de39988bafee95af43885e9027de8e.zip
blt-b4a7cb80b5de39988bafee95af43885e9027de8e.tar.gz
blt-b4a7cb80b5de39988bafee95af43885e9027de8e.tar.bz2
restore non parser cmd code
Diffstat (limited to 'ds9/library')
-rw-r--r--ds9/library/bin.tcl1
-rw-r--r--ds9/library/colorbar.tcl2
-rw-r--r--ds9/library/crop.tcl3
-rw-r--r--ds9/library/crosshair.tcl4
-rw-r--r--ds9/library/header.tcl21
-rw-r--r--ds9/library/marker.tcl1
6 files changed, 26 insertions, 6 deletions
diff --git a/ds9/library/bin.tcl b/ds9/library/bin.tcl
index f0f1e40..3cf60bd 100644
--- a/ds9/library/bin.tcl
+++ b/ds9/library/bin.tcl
@@ -775,6 +775,7 @@ proc ProcessBinCmd {varname iname} {
incr i
set bx [lindex $var $i]
set by [lindex $var [expr $i+1]]
+ # note: the spaces are needed so that the menus are in sync
if {$by != {} && [string is double $by]} {
set bin(factor) "$bx $by"
incr i
diff --git a/ds9/library/colorbar.tcl b/ds9/library/colorbar.tcl
index 2207886..ecbde24 100644
--- a/ds9/library/colorbar.tcl
+++ b/ds9/library/colorbar.tcl
@@ -1296,7 +1296,7 @@ proc ProcessCmapCmd {varname iname} {
UpdateColorDialog
}
}
- }
+}
}
proc CmapCmd {item} {
diff --git a/ds9/library/crop.tcl b/ds9/library/crop.tcl
index f51893e..14a73ba 100644
--- a/ds9/library/crop.tcl
+++ b/ds9/library/crop.tcl
@@ -410,7 +410,8 @@ proc ProcessCropCmd {varname iname} {
}
lock {
incr i
- CropCmdLock [lindex $var $i]
+ set crop(lock) [lindex $var $i]
+ LockCropCurrent
}
open {CropDialog}
close {CropDestroyDialog}
diff --git a/ds9/library/crosshair.tcl b/ds9/library/crosshair.tcl
index 69bf46a..13264fe 100644
--- a/ds9/library/crosshair.tcl
+++ b/ds9/library/crosshair.tcl
@@ -278,7 +278,8 @@ proc ProcessCrosshairCmd {varname iname} {
}
lock {
incr i
- CrosshairCmdLock [lindex $var $i]
+ set crosshair(lock) [lindex $var $i]
+ LockCrosshairCurrent
}
default {
set x [lindex $var [expr $i+0]]
@@ -291,6 +292,7 @@ proc ProcessCrosshairCmd {varname iname} {
incr i [FixSpec sys sky format physical fk5 degrees]
CrosshairTo $x $y $sys $sky
+ UpdateCrosshairDialog
}
}
}
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
}
}
diff --git a/ds9/library/marker.tcl b/ds9/library/marker.tcl
index a9df551..3a94fdb 100644
--- a/ds9/library/marker.tcl
+++ b/ds9/library/marker.tcl
@@ -1790,6 +1790,7 @@ proc ProcessRegionsCmd {varname iname sock fn} {
undo {MarkerUndo}
composite {CompositeCreate}
+ desolve -
dissove {CompositeDelete}
template {