diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-02-13 22:36:30 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-02-13 22:36:30 (GMT) |
commit | 425a9149fa34491afa0c01aa63b4003ada051215 (patch) | |
tree | 40714ad504e5a590805cd6973d5ef96b7edabfcd /ds9/library | |
parent | 25b0e0ee78b5a5d8a2088b40299bd7da6706fc05 (diff) | |
download | blt-425a9149fa34491afa0c01aa63b4003ada051215.zip blt-425a9149fa34491afa0c01aa63b4003ada051215.tar.gz blt-425a9149fa34491afa0c01aa63b4003ada051215.tar.bz2 |
fixed an issue with current zoom and block factor and menu selection
Diffstat (limited to 'ds9/library')
-rw-r--r-- | ds9/library/block.tcl | 18 | ||||
-rw-r--r-- | ds9/library/manalysis.tcl | 36 | ||||
-rw-r--r-- | ds9/library/mzoom.tcl | 66 | ||||
-rw-r--r-- | ds9/library/panzoom.tcl | 26 | ||||
-rw-r--r-- | ds9/library/util.tcl | 2 |
5 files changed, 74 insertions, 74 deletions
diff --git a/ds9/library/block.tcl b/ds9/library/block.tcl index 548f6e1..439c2d7 100644 --- a/ds9/library/block.tcl +++ b/ds9/library/block.tcl @@ -13,7 +13,7 @@ proc BlockDef {} { set iblock(mb) .blkmb set block(lock) 0 - set block(factor) { 1 1 } + set block(factor) {1 1} array set pblock [array get block] } @@ -113,17 +113,17 @@ proc BlockDialog {} { $mb.block add command -label [msgcat::mc {Block Fit}] -command BlockToFit $mb.block add separator $mb.block add radiobutton -label "[msgcat::mc {Block}] 1" \ - -variable block(factor) -value { 1 1 } -command ChangeBlock + -variable block(factor) -value {1 1} -command ChangeBlock $mb.block add radiobutton -label "[msgcat::mc {Block}] 2" \ - -variable block(factor) -value { 2 2 } -command ChangeBlock + -variable block(factor) -value {2 2} -command ChangeBlock $mb.block add radiobutton -label "[msgcat::mc {Block}] 4" \ - -variable block(factor) -value { 4 4 } -command ChangeBlock + -variable block(factor) -value {4 4} -command ChangeBlock $mb.block add radiobutton -label "[msgcat::mc {Block}] 8" \ - -variable block(factor) -value { 8 8 } -command ChangeBlock + -variable block(factor) -value {8 8} -command ChangeBlock $mb.block add radiobutton -label "[msgcat::mc {Block}] 16" \ - -variable block(factor) -value { 16 16 } -command ChangeBlock + -variable block(factor) -value {16 16} -command ChangeBlock $mb.block add radiobutton -label "[msgcat::mc {Block}] 32" \ - -variable block(factor) -value { 32 32 } -command ChangeBlock + -variable block(factor) -value {32 32} -command ChangeBlock # Param set f [ttk::frame $w.param] @@ -313,10 +313,10 @@ proc ProcessBlockCmd {varname iname} { set b1 [lindex $var [expr $i+1]] set b2 [lindex $var [expr $i+2]] if {[string is double $b2] && $b2 != {}} { - set block(factor) " $b1 $b2 " + set block(factor) "$b1 $b2" incr i 2 } else { - set block(factor) " $b1 $b1 " + set block(factor) "$b1 $b1" incr i } ChangeBlock diff --git a/ds9/library/manalysis.tcl b/ds9/library/manalysis.tcl index 36e8fe4..44d6425 100644 --- a/ds9/library/manalysis.tcl +++ b/ds9/library/manalysis.tcl @@ -121,17 +121,17 @@ proc AnalysisMainMenu {} { -command BlockToFit $ds9(mb).analysis.block add separator $ds9(mb).analysis.block add radiobutton -label "[msgcat::mc {Block}] 1" \ - -variable block(factor) -value { 1 1 } -command ChangeBlock + -variable block(factor) -value {1 1} -command ChangeBlock $ds9(mb).analysis.block add radiobutton -label "[msgcat::mc {Block}] 2" \ - -variable block(factor) -value { 2 2 } -command ChangeBlock + -variable block(factor) -value {2 2} -command ChangeBlock $ds9(mb).analysis.block add radiobutton -label "[msgcat::mc {Block}] 4" \ - -variable block(factor) -value { 4 4 } -command ChangeBlock + -variable block(factor) -value {4 4} -command ChangeBlock $ds9(mb).analysis.block add radiobutton -label "[msgcat::mc {Block}] 8" \ - -variable block(factor) -value { 8 8 } -command ChangeBlock + -variable block(factor) -value {8 8} -command ChangeBlock $ds9(mb).analysis.block add radiobutton -label "[msgcat::mc {Block}] 16" \ - -variable block(factor) -value { 16 16 } -command ChangeBlock + -variable block(factor) -value {16 16} -command ChangeBlock $ds9(mb).analysis.block add radiobutton -label "[msgcat::mc {Block}] 32" \ - -variable block(factor) -value { 32 32 } -command ChangeBlock + -variable block(factor) -value {32 32} -command ChangeBlock menu $ds9(mb).analysis.image $ds9(mb).analysis.image add command \ @@ -231,17 +231,17 @@ proc PrefsDialogAnalysisMenu {w} { menu $m.block $m.block add radiobutton -label "[msgcat::mc {Block}] 1" \ - -variable pblock(factor) -value { 1 1 } + -variable pblock(factor) -value {1 1} $m.block add radiobutton -label "[msgcat::mc {Block}] 2" \ - -variable pblock(factor) -value { 2 2 } + -variable pblock(factor) -value {2 2} $m.block add radiobutton -label "[msgcat::mc {Block}] 4" \ - -variable pblock(factor) -value { 4 4 } + -variable pblock(factor) -value {4 4} $m.block add radiobutton -label "[msgcat::mc {Block}] 8" \ - -variable pblock(factor) -value { 8 8 } + -variable pblock(factor) -value {8 8} $m.block add radiobutton -label "[msgcat::mc {Block}] 16" \ - -variable pblock(factor) -value { 16 16 } + -variable pblock(factor) -value {16 16} $m.block add radiobutton -label "[msgcat::mc {Block}] 32" \ - -variable pblock(factor) -value { 32 32 } + -variable pblock(factor) -value {32 32} pack $f -side top -fill both -expand true } @@ -313,22 +313,22 @@ proc CreateButtonsAnalysis {} { [string tolower [msgcat::mc {Block Fit}]] BlockToFit RadioButton $ds9(buttons).analysis.b1 \ "[string tolower [msgcat::mc {Block}]] 1" \ - block(factor) { 1 1 } ChangeBlock + block(factor) {1 1} ChangeBlock RadioButton $ds9(buttons).analysis.b2 \ "[string tolower [msgcat::mc {Block}]] 2" \ - block(factor) { 2 2 } ChangeBlock + block(factor) {2 2} ChangeBlock RadioButton $ds9(buttons).analysis.b4 \ "[string tolower [msgcat::mc {Block}]] 4" \ - block(factor) { 4 4 } ChangeBlock + block(factor) {4 4} ChangeBlock RadioButton $ds9(buttons).analysis.b8 \ "[string tolower [msgcat::mc {Block}]] 8" \ - block(factor) { 8 8 } ChangeBlock + block(factor) {8 8} ChangeBlock RadioButton $ds9(buttons).analysis.b16 \ "[string tolower [msgcat::mc {Block}]] 16" \ - block(factor) { 16 16 } ChangeBlock + block(factor) {16 16} ChangeBlock RadioButton $ds9(buttons).analysis.b32 \ "[string tolower [msgcat::mc {Block}]] 32" \ - block(factor) { 32 32 } ChangeBlock + block(factor) {32 32} ChangeBlock CheckButton $ds9(buttons).analysis.smooth \ [string tolower [msgcat::mc {Smooth}]] \ diff --git a/ds9/library/mzoom.tcl b/ds9/library/mzoom.tcl index 17fdade..1c7829b 100644 --- a/ds9/library/mzoom.tcl +++ b/ds9/library/mzoom.tcl @@ -23,27 +23,27 @@ proc ZoomMainMenu {} { -command ZoomToFit $ds9(mb).zoom add separator $ds9(mb).zoom add radiobutton -label "[msgcat::mc {Zoom}] 1/32" \ - -variable current(zoom) -value { 0.03125 0.03125 } -command ChangeZoom + -variable current(zoom) -value {0.03125 0.03125} -command ChangeZoom $ds9(mb).zoom add radiobutton -label "[msgcat::mc {Zoom}] 1/16" \ - -variable current(zoom) -value { 0.0625 0.0625 } -command ChangeZoom + -variable current(zoom) -value {0.0625 0.0625} -command ChangeZoom $ds9(mb).zoom add radiobutton -label "[msgcat::mc {Zoom}] 1/8" \ - -variable current(zoom) -value { 0.125 0.125 } -command ChangeZoom + -variable current(zoom) -value {0.125 0.125} -command ChangeZoom $ds9(mb).zoom add radiobutton -label "[msgcat::mc {Zoom}] 1/4" \ - -variable current(zoom) -value { 0.25 0.25 } -command ChangeZoom + -variable current(zoom) -value {0.25 0.25} -command ChangeZoom $ds9(mb).zoom add radiobutton -label "[msgcat::mc {Zoom}] 1/2" \ - -variable current(zoom) -value { 0.5 0.5 } -command ChangeZoom + -variable current(zoom) -value {0.5 0.5} -command ChangeZoom $ds9(mb).zoom add radiobutton -label "[msgcat::mc {Zoom}] 1" \ - -variable current(zoom) -value { 1 1 } -command ChangeZoom + -variable current(zoom) -value {1 1} -command ChangeZoom $ds9(mb).zoom add radiobutton -label "[msgcat::mc {Zoom}] 2" \ - -variable current(zoom) -value { 2 2 } -command ChangeZoom + -variable current(zoom) -value {2 2} -command ChangeZoom $ds9(mb).zoom add radiobutton -label "[msgcat::mc {Zoom}] 4" \ - -variable current(zoom) -value { 4 4 } -command ChangeZoom + -variable current(zoom) -value {4 4} -command ChangeZoom $ds9(mb).zoom add radiobutton -label "[msgcat::mc {Zoom}] 8" \ - -variable current(zoom) -value { 8 8 } -command ChangeZoom + -variable current(zoom) -value {8 8} -command ChangeZoom $ds9(mb).zoom add radiobutton -label "[msgcat::mc {Zoom}] 16" \ - -variable current(zoom) -value { 16 16 } -command ChangeZoom + -variable current(zoom) -value {16 16} -command ChangeZoom $ds9(mb).zoom add radiobutton -label "[msgcat::mc {Zoom}] 32" \ - -variable current(zoom) -value { 32 32 } -command ChangeZoom + -variable current(zoom) -value {32 32} -command ChangeZoom $ds9(mb).zoom add separator $ds9(mb).zoom add radiobutton -label [msgcat::mc {None}] \ -variable current(orient) -value none -command ChangeOrient @@ -85,27 +85,27 @@ proc PrefsDialogZoomMenu {w} { -variable pcurrent(align) $m add separator $m add radiobutton -label "[msgcat::mc {Zoom}] 1/32" \ - -variable pcurrent(zoom) -value { 0.03125 0.03125 } + -variable pcurrent(zoom) -value {0.03125 0.03125} $m add radiobutton -label "[msgcat::mc {Zoom}] 1/16" \ - -variable pcurrent(zoom) -value { 0.0625 0.0625 } + -variable pcurrent(zoom) -value {0.0625 0.0625} $m add radiobutton -label "[msgcat::mc {Zoom}] 1/8" \ - -variable pcurrent(zoom) -value { 0.125 0.125 } + -variable pcurrent(zoom) -value {0.125 0.125} $m add radiobutton -label "[msgcat::mc {Zoom}] 1/4" \ - -variable pcurrent(zoom) -value { 0.25 0.25 } + -variable pcurrent(zoom) -value {0.25 0.25} $m add radiobutton -label "[msgcat::mc {Zoom}] 1/2" \ - -variable pcurrent(zoom) -value { 0.5 0.5 } + -variable pcurrent(zoom) -value {0.5 0.5} $m add radiobutton -label "[msgcat::mc {Zoom}] 1" \ - -variable pcurrent(zoom) -value { 1 1 } + -variable pcurrent(zoom) -value {1 1} $m add radiobutton -label "[msgcat::mc {Zoom}] 2" \ - -variable pcurrent(zoom) -value { 2 2 } + -variable pcurrent(zoom) -value {2 2} $m add radiobutton -label "[msgcat::mc {Zoom}] 4" \ - -variable pcurrent(zoom) -value { 4 4 } + -variable pcurrent(zoom) -value {4 4} $m add radiobutton -label "[msgcat::mc {Zoom}] 8" \ - -variable pcurrent(zoom) -value { 8 8 } + -variable pcurrent(zoom) -value {8 8} $m add radiobutton -label "[msgcat::mc {Zoom}] 16" \ - -variable pcurrent(zoom) -value { 16 16 } + -variable pcurrent(zoom) -value {16 16} $m add radiobutton -label "[msgcat::mc {Zoom}] 32" \ - -variable pcurrent(zoom) -value { 32 32 } + -variable pcurrent(zoom) -value {32 32} $m add separator $m add radiobutton -label [msgcat::mc {None}] \ -variable pcurrent(orient) -value none @@ -219,37 +219,37 @@ proc CreateButtonsZoom {} { [string tolower [msgcat::mc {Zoom Fit}]] ZoomToFit RadioButton $ds9(buttons).zoom.i32 \ "[string tolower [msgcat::mc {Zoom}]] 1/32" \ - current(zoom) { 0.03125 0.03125 } ChangeZoom + current(zoom) {0.03125 0.03125} ChangeZoom RadioButton $ds9(buttons).zoom.i16 \ "[string tolower [msgcat::mc {Zoom}]] 1/16" \ - current(zoom) { 0.0625 0.0625 } ChangeZoom + current(zoom) {0.0625 0.0625} ChangeZoom RadioButton $ds9(buttons).zoom.i8 \ "[string tolower [msgcat::mc {Zoom}]] 1/8" \ - current(zoom) { 0.125 0.125 } ChangeZoom + current(zoom) {0.125 0.125} ChangeZoom RadioButton $ds9(buttons).zoom.i4 \ "[string tolower [msgcat::mc {Zoom}]] 1/4" \ - current(zoom) { 0.25 0.25 } ChangeZoom + current(zoom) {0.25 0.25} ChangeZoom RadioButton $ds9(buttons).zoom.i2 \ "[string tolower [msgcat::mc {Zoom}]] 1/2" \ - current(zoom) { 0.5 0.5 } ChangeZoom + current(zoom) {0.5 0.5} ChangeZoom RadioButton $ds9(buttons).zoom.1 \ "[string tolower [msgcat::mc {Zoom}]] 1" \ - current(zoom) { 1 1 } ChangeZoom + current(zoom) {1 1} ChangeZoom RadioButton $ds9(buttons).zoom.2 \ "[string tolower [msgcat::mc {Zoom}]] 2" \ - current(zoom) { 2 2 } ChangeZoom + current(zoom) {2 2} ChangeZoom RadioButton $ds9(buttons).zoom.4 \ "[string tolower [msgcat::mc {Zoom}]] 4" \ - current(zoom) { 4 4 } ChangeZoom + current(zoom) {4 4} ChangeZoom RadioButton $ds9(buttons).zoom.8 \ "[string tolower [msgcat::mc {Zoom}]] 8" \ - current(zoom) { 8 8 } ChangeZoom + current(zoom) {8 8} ChangeZoom RadioButton $ds9(buttons).zoom.16 \ "[string tolower [msgcat::mc {Zoom}]] 16" \ - current(zoom) { 16 16 } ChangeZoom + current(zoom) {16 16} ChangeZoom RadioButton $ds9(buttons).zoom.32 \ "[string tolower [msgcat::mc {Zoom}]] 32" \ - current(zoom) { 32 32 } ChangeZoom + current(zoom) {32 32} ChangeZoom RadioButton $ds9(buttons).zoom.none \ [string tolower [msgcat::mc {None}]] \ diff --git a/ds9/library/panzoom.tcl b/ds9/library/panzoom.tcl index 1572f7b..e890236 100644 --- a/ds9/library/panzoom.tcl +++ b/ds9/library/panzoom.tcl @@ -384,27 +384,27 @@ proc PanZoomDialog {} { $mb.zoom add command -label [msgcat::mc {Zoom Fit}] -command ZoomToFit $mb.zoom add separator $mb.zoom add radiobutton -label "[msgcat::mc {Zoom}] 1/32" \ - -variable current(zoom) -value { 0.03125 0.03125 } -command ChangeZoom + -variable current(zoom) -value {0.03125 0.03125} -command ChangeZoom $mb.zoom add radiobutton -label "[msgcat::mc {Zoom}] 1/16" \ - -variable current(zoom) -value { 0.0625 0.0625 } -command ChangeZoom + -variable current(zoom) -value {0.0625 0.0625} -command ChangeZoom $mb.zoom add radiobutton -label "[msgcat::mc {Zoom}] 1/8" \ - -variable current(zoom) -value { 0.125 0.125 } -command ChangeZoom + -variable current(zoom) -value {0.125 0.125} -command ChangeZoom $mb.zoom add radiobutton -label "[msgcat::mc {Zoom}] 1/4" \ - -variable current(zoom) -value { 0.25 0.25 } -command ChangeZoom + -variable current(zoom) -value {0.25 0.25} -command ChangeZoom $mb.zoom add radiobutton -label "[msgcat::mc {Zoom}] 1/2" \ - -variable current(zoom) -value { 0.5 0.5 } -command ChangeZoom + -variable current(zoom) -value {0.5 0.5} -command ChangeZoom $mb.zoom add radiobutton -label "[msgcat::mc {Zoom}] 1" \ - -variable current(zoom) -value { 1 1 } -command ChangeZoom + -variable current(zoom) -value {1 1} -command ChangeZoom $mb.zoom add radiobutton -label "[msgcat::mc {Zoom}] 2" \ - -variable current(zoom) -value { 2 2 } -command ChangeZoom + -variable current(zoom) -value {2 2} -command ChangeZoom $mb.zoom add radiobutton -label "[msgcat::mc {Zoom}] 4" \ - -variable current(zoom) -value { 4 4 } -command ChangeZoom + -variable current(zoom) -value {4 4} -command ChangeZoom $mb.zoom add radiobutton -label "[msgcat::mc {Zoom}] 8" \ - -variable current(zoom) -value { 8 8 } -command ChangeZoom + -variable current(zoom) -value {8 8} -command ChangeZoom $mb.zoom add radiobutton -label "[msgcat::mc {Zoom}] 16" \ - -variable current(zoom) -value { 16 16 } -command ChangeZoom + -variable current(zoom) -value {16 16} -command ChangeZoom $mb.zoom add radiobutton -label "[msgcat::mc {Zoom}] 32" \ - -variable current(zoom) -value { 32 32 } -command ChangeZoom + -variable current(zoom) -value {32 32} -command ChangeZoom menu $mb.orient $mb.orient add radiobutton -label [msgcat::mc {None}] \ @@ -737,10 +737,10 @@ proc ProcessZoomCmd {varname iname} { set z1 [lindex $var [expr $i+1]] set z2 [lindex $var [expr $i+2]] if {[string is double $z2] && $z2 != {}} { - set current(zoom) " $z1 $z2 " + set current(zoom) "$z1 $z2" incr i 2 } else { - set current(zoom) " $z1 $z1 " + set current(zoom) "$z1 $z1" incr i } ChangeZoom diff --git a/ds9/library/util.tcl b/ds9/library/util.tcl index a5a5b14..cac8702 100644 --- a/ds9/library/util.tcl +++ b/ds9/library/util.tcl @@ -17,7 +17,7 @@ proc CurrentDef {} { set current(display) single set current(mode) none - set current(zoom) { 1 1 } + set current(zoom) {1 1} set current(rotate) 0 set current(orient) none set current(align) 0 |