summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-11-09 21:10:30 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-11-09 21:10:30 (GMT)
commit36aac058541aebc86ae5f19a7e59fa892ac81cf1 (patch)
tree3b000f428c495d956f4624ad8bc09bf7c6b17f34
parent1772cc3748f183d207660c21b164f9385853844d (diff)
downloadblt-36aac058541aebc86ae5f19a7e59fa892ac81cf1.zip
blt-36aac058541aebc86ae5f19a7e59fa892ac81cf1.tar.gz
blt-36aac058541aebc86ae5f19a7e59fa892ac81cf1.tar.bz2
region to mask
-rw-r--r--ds9/library/marker.tcl58
1 files changed, 6 insertions, 52 deletions
diff --git a/ds9/library/marker.tcl b/ds9/library/marker.tcl
index 962448f..a696df0 100644
--- a/ds9/library/marker.tcl
+++ b/ds9/library/marker.tcl
@@ -51,8 +51,6 @@ 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]
@@ -1259,58 +1257,14 @@ proc MarkerMask {} {
return
}
- 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)
+ if {[MaskParamsDialog]} {
+ $current(frame) mask color $mask(color)
+ $current(frame) mask mark $mask(mark)
+ $current(frame) mask range $mask(low) $mask(high)
+ $current(frame) mask system $mask(system)
- # 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)
+ $current(frame) marker create mask
}
-
- set rr $ed(ok)
- unset ed
- return $rr
}
proc MarkerInfo {} {