summaryrefslogtreecommitdiffstats
path: root/ds9/library/mregion.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-11-08 19:42:12 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-11-08 19:42:12 (GMT)
commit82f796251e759a6cd7886a56b6631f2229545c5e (patch)
tree775411120671ff859c2aeb858bf543f1c0c1f5f0 /ds9/library/mregion.tcl
parent50bf2c8ef50345a11e3fc301873a295c581fd61a (diff)
downloadblt-82f796251e759a6cd7886a56b6631f2229545c5e.zip
blt-82f796251e759a6cd7886a56b6631f2229545c5e.tar.gz
blt-82f796251e759a6cd7886a56b6631f2229545c5e.tar.bz2
add convert to mask
Diffstat (limited to 'ds9/library/mregion.tcl')
-rw-r--r--ds9/library/mregion.tcl13
1 files changed, 13 insertions, 0 deletions
diff --git a/ds9/library/mregion.tcl b/ds9/library/mregion.tcl
index 82d0cb8..b2f7686 100644
--- a/ds9/library/mregion.tcl
+++ b/ds9/library/mregion.tcl
@@ -62,6 +62,7 @@ proc RegionMainMenu {} {
-command MarkerLoad
$ds9(mb).region add command -label "[msgcat::mc {Save Regions}]..." \
-command MarkerSave
+ $ds9(mb).region add separator
$ds9(mb).region add command -label [msgcat::mc {Convert to Mask}] \
-command Marker2Mask
$ds9(mb).region add separator
@@ -1099,6 +1100,18 @@ proc UpdateRegionMenu {} {
}
}
}
+
+ switch [$current(frame) get type] {
+ base {
+ $ds9(mb).region entryconfig [msgcat::mc {Convert to Mask}] \
+ -state normal
+ }
+ rgb -
+ 3d {
+ $ds9(mb).region entryconfig [msgcat::mc {Convert to Mask}] \
+ -state disabled
+ }
+ }
} else {
$ds9(mb) entryconfig [msgcat::mc {Region}] -state disabled
}