diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-05-17 17:26:42 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-05-17 17:26:42 (GMT) |
commit | a89d01d5ec3346e680a29a2f496cdccbaddd0551 (patch) | |
tree | f378ed14ef1432ba85a7c59bcdf175446d49c36b /ds9/library | |
parent | 07822cd7581379ec5c0d34b0fa2e9966c37316d5 (diff) | |
download | blt-a89d01d5ec3346e680a29a2f496cdccbaddd0551.zip blt-a89d01d5ec3346e680a29a2f496cdccbaddd0551.tar.gz blt-a89d01d5ec3346e680a29a2f496cdccbaddd0551.tar.bz2 |
update ds9 parsers
Diffstat (limited to 'ds9/library')
-rw-r--r-- | ds9/library/colorbar.tcl | 30 | ||||
-rw-r--r-- | ds9/library/grid.tcl | 8 | ||||
-rw-r--r-- | ds9/library/plotprocess.tcl | 1 |
3 files changed, 20 insertions, 19 deletions
diff --git a/ds9/library/colorbar.tcl b/ds9/library/colorbar.tcl index f23bdd5..6e40275 100644 --- a/ds9/library/colorbar.tcl +++ b/ds9/library/colorbar.tcl @@ -1357,7 +1357,6 @@ proc ProcessSendCmapCmd {proc id param} { file {$proc $id "[$current(colorbar) get file name]\n"} invert {$proc $id [ToYesNo $colorbar(invert)]} value {$proc $id "[$current(colorbar) get contrast] [$current(colorbar) get bias]\n"} - # backward compatibility lock {$proc $id [ToYesNo $colorbar(lock)]} {} {$proc $id "[$current(colorbar) get name]\n"} } @@ -1494,32 +1493,27 @@ proc ColorbarCmdSet {which value {cmd {}}} { } } -proc ColorbarCmdFontStyle {value} { - global cvarname - upvar #0 $cvarname cvar - global $cvar(symdb) +proc ColorbarCmdFontStyle {value {cmd {}}} { + global colorbar switch $value { normal { - starbase_set $cvar(symdb) $cvar(row) \ - [starbase_colnum $cvar(symdb) fontweigth] normal - starbase_set $cvar(symdb) $cvar(row) \ - [starbase_colnum $cvar(symdb) fontslant] roman + set colorbar(font,weight) normal + set colorbar(font,slant) roman } bold { - starbase_set $cvar(symdb) $cvar(row) \ - [starbase_colnum $cvar(symdb) fontweight] bold - starbase_set $cvar(symdb) $cvar(row) \ - [starbase_colnum $cvar(symdb) fontslant] roman + set colorbar(font,weight) bold + set colorbar(font,slant) roman } italic { - starbase_set $cvar(symdb) $cvar(row) \ - [starbase_colnum $cvar(symdb) weight] normal - starbase_set $cvar(symdb) $cvar(row) \ - [starbase_colnum $cvar(symdb) slant] italic + set colorbar(font,weight) normal + set colorbar(font,slant) italic } } - CATGenerate $cvarname + + if {$cmd != {}} { + eval $cmd + } } proc ProcessSendColorbarCmd {proc id param} { diff --git a/ds9/library/grid.tcl b/ds9/library/grid.tcl index 314a804..789421c 100644 --- a/ds9/library/grid.tcl +++ b/ds9/library/grid.tcl @@ -1410,7 +1410,9 @@ proc GridCmdSet {which value {cmd {}}} { } } -proc GridCmdFontStyle {which value} { +proc GridCmdFontStyle {which value {cmd {}}} { + global grid + switch $value { normal { set grid($which,weight) normal @@ -1425,6 +1427,10 @@ proc GridCmdFontStyle {which value} { set grid($which,slant) italic } } + + if {$cmd != {}} { + eval $cmd + } } proc ProcessSendGridCmd {proc id param} { diff --git a/ds9/library/plotprocess.tcl b/ds9/library/plotprocess.tcl index 2d0a23b..3f7f631 100644 --- a/ds9/library/plotprocess.tcl +++ b/ds9/library/plotprocess.tcl @@ -729,6 +729,7 @@ proc PlotCmdFontStyle {which value} { set cvar($which,slant) italic } } + $cvar(proc,updategraph) $cvarname } |