From b4a7cb80b5de39988bafee95af43885e9027de8e Mon Sep 17 00:00:00 2001 From: William Joye Date: Tue, 10 Apr 2018 17:24:12 -0400 Subject: restore non parser cmd code --- ds9/library/bin.tcl | 1 + ds9/library/colorbar.tcl | 2 +- ds9/library/crop.tcl | 3 ++- ds9/library/crosshair.tcl | 4 +++- ds9/library/header.tcl | 21 ++++++++++++++++++--- ds9/library/marker.tcl | 1 + 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 { -- cgit v0.12