Viewing contents of file '../idllib/astron/contrib/varosi/code/allpro/display_refresh.pro'
;+
; NAME:
;	Display_Refresh
; PURPOSE:
;	For the MODION widget:
;	Refresh the display of energy levels and transitions in
;	the main draw widget window. Usually called by pro Draw_Axes_Set_V
;	of CW_Draw_Axes widget, when value is set by the Modion widget.
; CALLING:
;	Display_Refresh, widgst
; INPUTS:
;	widgst = structure, state and info of CW_Draw_Axes widget.
;
;		and variables in common blocks.
; OUTPUTS:
;	None.
; COMMON BLOCKS:
;	common modion_Widget, modion_widget
;		and see file: ~/modion/code/modion_common.pro
; EXTERNAL CALLS:
;	pro Display_ELevs
;	pro Display_Trans
;	pro Display_SupLevs
; PROCEDURE:
;	Straightforward.
; HISTORY:
;	Written: Frank Varosi NASA/GSFC 1995.
;-

pro Display_Refresh, widgst

@modion_common
   common modion_Widget, modion_widget

	on_error,2
	save_win = !D.window
	reducf = modion_widget.Zoomf / modion_widget.Zfmax

	wset, widgst.draw.window
	erase
	Display_Trans, BB_Trans, ZOOM=reducf

	if (modion_widget.Line_supLevs) then begin
		Display_ELevs, ELevs, ZOOM=reducf
		Display_SupLevs, SupLevs, ZOOM=reducf
	 endif else begin
		Display_SupLevs, SupLevs, ZOOM=reducf
		Display_ELevs, ELevs, ZOOM=reducf
	  endelse
						
	if (save_win GE 0) then wset, save_win
end