diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-11-09 19:56:18 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-11-09 19:56:18 (GMT) |
commit | 1772cc3748f183d207660c21b164f9385853844d (patch) | |
tree | d698526b66f0f558ea1153600497546f47488d09 /ds9/library/marker.tcl | |
parent | 230ef6d812fc698695a7742f1ddce1d437f31fb4 (diff) | |
download | blt-1772cc3748f183d207660c21b164f9385853844d.zip blt-1772cc3748f183d207660c21b164f9385853844d.tar.gz blt-1772cc3748f183d207660c21b164f9385853844d.tar.bz2 |
add mask nan
Diffstat (limited to 'ds9/library/marker.tcl')
-rw-r--r-- | ds9/library/marker.tcl | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/ds9/library/marker.tcl b/ds9/library/marker.tcl index 71e8424..962448f 100644 --- a/ds9/library/marker.tcl +++ b/ds9/library/marker.tcl @@ -51,6 +51,8 @@ proc MarkerDef {} { set marker(format) ds9 + set marker(mask) nonzero + # these are only used for save/load/list and # are set from current wcs values array set pmarker [array get marker] @@ -1257,7 +1259,58 @@ proc MarkerMask {} { return } - $current(frame) marker create mask + if {[MarkerMaskParamsDialog]} { +# $current(frame) marker create mask $marker(mask) + } +} + +proc MarkerMaskParamsDialog {} { + global marker + global ed + + set w {.markermskd} + + set ed(ok) 0 + set ed(mask) $marker(mask) + + DialogCreate $w [msgcat::mc {Mask Parameters}] ed(ok) + + # Param + set f [ttk::frame $w.param] + + ttk::label $f.marktitle -text [msgcat::mc {Block}] + ttk::radiobutton $f.zero -text [msgcat::mc {Zero}] \ + -variable marker(mask) -value zero + ttk::radiobutton $f.nonzero -text [msgcat::mc {Non-zero}] \ + -variable marker(mask) -value nonzero + + grid $f.marktitle $f.zero $f.nonzero -padx 2 -pady 2 -sticky w + + # Buttons + set f [ttk::frame $w.buttons] + ttk::button $f.ok -text [msgcat::mc {OK}] -command {set ed(ok) 1} \ + -default active + ttk::button $f.cancel -text [msgcat::mc {Cancel}] -command {set ed(ok) 0} + pack $f.ok $f.cancel -side left -expand true -padx 2 -pady 4 + + bind $w <Return> {set ed(ok) 1} + + # Fini + ttk::separator $w.sep -orient horizontal + pack $w.buttons $w.sep -side bottom -fill x + pack $w.param -side top -fill both -expand true + + DialogCenter $w + DialogWait $w ed(ok) + DialogDismiss $w + + if {$ed(ok)} { + set marker(mask) $ed(mask) + } + + set rr $ed(ok) + unset ed + return $rr } proc MarkerInfo {} { |