summaryrefslogtreecommitdiffstats
path: root/ds9/library
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-08-22 18:35:58 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-08-22 18:35:58 (GMT)
commit4b69d43161c8b6b8fe6493d50d965a90c5e58b88 (patch)
tree4603f05d3192c215e92fa5aaf93af1db64f1beb4 /ds9/library
parent2ce2cfcf340128b8c14f335581ec9819352fd7af (diff)
downloadblt-4b69d43161c8b6b8fe6493d50d965a90c5e58b88.zip
blt-4b69d43161c8b6b8fe6493d50d965a90c5e58b88.tar.gz
blt-4b69d43161c8b6b8fe6493d50d965a90c5e58b88.tar.bz2
clean up code
Diffstat (limited to 'ds9/library')
-rw-r--r--ds9/library/command.tcl11
-rw-r--r--ds9/library/frame.tcl6
-rw-r--r--ds9/library/load.tcl25
-rw-r--r--ds9/library/panzoom.tcl1
4 files changed, 14 insertions, 29 deletions
diff --git a/ds9/library/command.tcl b/ds9/library/command.tcl
index 77bf8b4..2494049 100644
--- a/ds9/library/command.tcl
+++ b/ds9/library/command.tcl
@@ -87,7 +87,6 @@ proc ProcessCommand {argv argc} {
set file(layer) {}
set file(mosaic) wcs
- set load 0
set noopts 0
set i 0
@@ -460,10 +459,6 @@ proc ProcessCommand {argv argc} {
return
}
- if {$load == 0} {
- incr load
- }
-
switch $ds9(wm) {
x11 -
aqua {CommandLineLoad $item argv i}
@@ -482,15 +477,13 @@ proc ProcessCommand {argv argc} {
}
}
- FinishLoadPre
+ LoadUpdate
}
}
incr i
}
- if {$load != 0} {
- UpdateDS9
- }
+ UpdateDS9
}
proc CommandLineLoad {item argvname iname} {
diff --git a/ds9/library/frame.tcl b/ds9/library/frame.tcl
index 8aa265c..ca4ca62 100644
--- a/ds9/library/frame.tcl
+++ b/ds9/library/frame.tcl
@@ -66,6 +66,7 @@ proc CreateNameNumberFrame {which type} {
global pmagnifier
global bin
global wcs
+ global rgb
global colorbar
global scale
global minmax
@@ -149,8 +150,8 @@ proc CreateNameNumberFrame {which type} {
# Frame type items
switch -- [$ds9(next) get type] {
- base -
- rgb {}
+ base {}
+ rgb {$ds9(next) rgb system $rgb(system)}
3d {
$ds9(next) 3d method $pthreed(method)
$ds9(next) 3d background $pthreed(background)
@@ -1925,7 +1926,6 @@ proc FrameToFront {} {
}
UpdateGraphLayout $which
-
UpdateDS9
}
diff --git a/ds9/library/load.tcl b/ds9/library/load.tcl
index 025ce9f..87f98b2 100644
--- a/ds9/library/load.tcl
+++ b/ds9/library/load.tcl
@@ -252,12 +252,14 @@ proc ProcessLoadSaveParams {varname} {
}
}
-proc FinishLoadPre {} {
- global loadParam
+proc LoadUpdate {} {
global current
- global threed
- UpdateWCS
+ # just in case, frame may have been deleted before FinishLoad during startup
+ if {$current(frame) != {}} {
+ # if header(s) were open, remove them
+ DestroyHeader $current(frame)
+ }
# generate grid so UpdateMenu is correct
GridUpdateCurrent
@@ -265,23 +267,14 @@ proc FinishLoadPre {} {
# generate contour so UpdateMenu is correct
UpdateContourScale
UpdateContour
+}
- # just in case, frame may have been deleted before FinishLoad during startup
- if {$current(frame) == {}} {
- return
- }
-
- # if header(s) were open, remove them
- DestroyHeader $current(frame)
-
+proc FinishLoad {} {
+ LoadUpdate
# Cube?
if {[$current(frame) has fits cube]} {
CubeDialog
}
-}
-
-proc FinishLoad {} {
- FinishLoadPre
UpdateDS9
}
diff --git a/ds9/library/panzoom.tcl b/ds9/library/panzoom.tcl
index d2d6400..e7d91fd 100644
--- a/ds9/library/panzoom.tcl
+++ b/ds9/library/panzoom.tcl
@@ -564,7 +564,6 @@ proc AlignWCSFrame {} {
LockFrameCurrent
UpdateGraphAxis $current(frame)
- UpdatePanZoomDialog
}
}