diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-08-01 19:50:28 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-08-01 19:50:28 (GMT) |
commit | 4920b5dcdfd14897ee44086e48e79591b7174bc5 (patch) | |
tree | c2efceb0872c035fba943c1c6758b8bd2108636b | |
parent | cc3af5cd815088309f786bcecad439787aa8d354 (diff) | |
download | blt-4920b5dcdfd14897ee44086e48e79591b7174bc5.zip blt-4920b5dcdfd14897ee44086e48e79591b7174bc5.tar.gz blt-4920b5dcdfd14897ee44086e48e79591b7174bc5.tar.bz2 |
CAT: selected rows blink markers in RED (/GREEN)
-rw-r--r-- | ds9/doc/release/r7.6.html | 1 | ||||
-rw-r--r-- | ds9/library/catcmd.tcl | 32 |
2 files changed, 28 insertions, 5 deletions
diff --git a/ds9/doc/release/r7.6.html b/ds9/doc/release/r7.6.html index e15dc48..e9dfae5 100644 --- a/ds9/doc/release/r7.6.html +++ b/ds9/doc/release/r7.6.html @@ -111,6 +111,7 @@ <li><tt>07.31.2017 CUBE: fixed issues with command line/XPA/SAMP options.</tt></li> <li><tt>08.01.2017 WCS: Use default values for wcs keywords (CRPIX, CRVAL, CDELT, CD, PC) if not present in header.</tt></li> <li><tt>08.01.2017 CUBE: remove un-needed WCS keywords when saving as a slice.</tt></li> + <li><tt>08.01.2017 CAT: selected rows blink markers in RED (/GREEN).</tt></li> <li><tt><b>xx.xx.2017 RELEASE version 7.6b4</b></tt></li> </ol> </ol> diff --git a/ds9/library/catcmd.tcl b/ds9/library/catcmd.tcl index dad827a..43b13d8 100644 --- a/ds9/library/catcmd.tcl +++ b/ds9/library/catcmd.tcl @@ -83,6 +83,7 @@ proc CATSelectBrowseCmd {varname ss rc} { # init timer vars set var(blink,count) 0 set var(blink,marker) {} + set var(blink,marker,color) {} # now see the current selection set last [lindex [split $ss ,] 0] @@ -108,7 +109,10 @@ proc CATSelectBrowseCmd {varname ss rc} { } foreach rr $rowlist { - lappend ${varname}(blink,marker) "\{${varname}.${rr}\}" + set tag "\{${varname}.${rr}\}" + lappend ${varname}(blink,marker) $tag + lappend ${varname}(blink,marker,color) \ + [$var(frame) get marker catalog $tag color] } # status @@ -176,9 +180,13 @@ proc CATSelectRows {varname src rowlist} { # init timer vars set var(blink,count) 0 set var(blink,marker) {} + set var(blink,marker,color) {} foreach rr $rowlist { - lappend ${varname}(blink,marker) "\{${varname}.${rr}\}" + set tag "\{${varname}.${rr}\}" + lappend ${varname}(blink,marker) $tag + lappend ${varname}(blink,marker,color) \ + [$var(frame) get marker catalog $tag color] } # status @@ -239,16 +247,26 @@ proc CATSelectTimer {varname} { set var(blink) 0 set var(blink,count) 0 set var(blink,marker) {} + set var(blink,marker,color) {} } 1 { - foreach mm $var(blink,marker) { + for {set ii 0} {$ii<[llength $var(blink,marker)]} {incr ii} { + set mm [lindex $var(blink,marker) $ii] + set clr [lindex $var(blink,marker,color) $ii] + if {[info commands $var(frame)] != {}} { if {[$var(frame) has fits]} { + if {$var(blink,count) < 4} { + switch $clr { + red {$var(frame) marker catalog $mm color green} + default {$var(frame) marker catalog $mm color red} + } + } $var(frame) marker catalog $mm highlite } } } - + incr ${varname}(blink,count) if {$var(blink,count) < 5} { set var(blink) 2 @@ -259,9 +277,13 @@ proc CATSelectTimer {varname} { after 250 [list CATSelectTimer $varname] } 2 { - foreach mm $var(blink,marker) { + for {set ii 0} {$ii<[llength $var(blink,marker)]} {incr ii} { + set mm [lindex $var(blink,marker) $ii] + set clr [lindex $var(blink,marker,color) $ii] + if {[info commands $var(frame)] != {}} { if {[$var(frame) has fits]} { + $var(frame) marker catalog $mm color $clr $var(frame) marker catalog $mm unhighlite } } |