From 4b69d43161c8b6b8fe6493d50d965a90c5e58b88 Mon Sep 17 00:00:00 2001 From: William Joye Date: Tue, 22 Aug 2017 14:35:58 -0400 Subject: clean up code --- ds9/doc/release/r7.6.html | 2 ++ ds9/library/command.tcl | 11 ++--------- ds9/library/frame.tcl | 6 +++--- ds9/library/load.tcl | 25 +++++++++---------------- ds9/library/panzoom.tcl | 1 - 5 files changed, 16 insertions(+), 29 deletions(-) diff --git a/ds9/doc/release/r7.6.html b/ds9/doc/release/r7.6.html index 92a63e3..a1a0952 100644 --- a/ds9/doc/release/r7.6.html +++ b/ds9/doc/release/r7.6.html @@ -130,6 +130,8 @@
  • 08.16.2017 FITSY++: FITS compression- fixed a problem with ZQUANIZ=NO_DITHER.
  • 08.16.2017 FITSY++: FITS compression- fixed a problem with BITPIX=-64 and ZQUANTIZ=NONE.
  • 08.18.2017 RELEASE version 7.6b5
  • +
  • 08.22.2017 GUI: don't update screen until end when loading mulitple files from command line.
  • +
  • xx.xx.2017 RELEASE version 7.6b6
  • 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 } } -- cgit v0.12