diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-04-25 17:14:56 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-04-25 17:14:56 (GMT) |
commit | 36f467ca5206c5d1e70fd1ced808d776ebd87d5d (patch) | |
tree | 564e0f774c6f50b6c54749df57b3c14e4c2edd93 /ds9/library/frame.tcl | |
parent | f46f5e4aac83baa513c957a989ba539363632cd8 (diff) | |
download | blt-36f467ca5206c5d1e70fd1ced808d776ebd87d5d.zip blt-36f467ca5206c5d1e70fd1ced808d776ebd87d5d.tar.gz blt-36f467ca5206c5d1e70fd1ced808d776ebd87d5d.tar.bz2 |
MASK: fixed an issue with mask and backups
Diffstat (limited to 'ds9/library/frame.tcl')
-rw-r--r-- | ds9/library/frame.tcl | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/ds9/library/frame.tcl b/ds9/library/frame.tcl index f953076..c2648fc 100644 --- a/ds9/library/frame.tcl +++ b/ds9/library/frame.tcl @@ -1834,10 +1834,7 @@ proc ClearFrame {which} { return } - DestroyHeader $which - $which clear - - # delete saved loadParams + # delete saved regular loadParams foreach cc {{} red green blue} { set varname $which$cc global $varname @@ -1845,6 +1842,33 @@ proc ClearFrame {which} { unset $varname } } + + # delete saved file,mode loadParams + set cnt [$which get fits count] + for {set ii 2} {$ii<=$cnt} {incr ii} { + set varname $which.$ii + global $varname + if {[info exists $varname]} { + unset $varname + } else { + break + } + } + + # delete saved mask loadParams + set cnt [$which get mask count] + for {set ii 1} {$ii<=$cnt} {incr ii} { + set varname $which.m${ii} + global $varname + if {[info exists $varname]} { + unset $varname + } else { + break + } + } + + DestroyHeader $which + $which clear } # Private Procedures |