;******************************************************************************
;* File name: ql_refresh.pro                                                  *
;*                                                                            *
;* Content  :   ql_refresh                                                    *
;*                                                                            *
;*                                                                            *
;* Date		Author		Comment                                       *
;* -------------------------------------------------------------------------- *
;* 18-02-94	E.PETIT	   	Creation                                      *
;* 02-03-94	E.PETIT	   	Extend area                                   *
;* 14-04-94	E.PETIT	   	remove discret format                         *
;*                                                                            *
;******************************************************************************
;***

;***
;##############################################################################
;#Function  name   : ql_refresh                                               #
;#LEVEL            : 2                                                        #
;#                                                                            #
;#Author           : Emmanuel PETIT                                           #
;#Language         : IDL                                                      #
;#Purpose          : refresh current image/profile                            #
;#                   with pixmap copy done in previous display                #
;#Creation date    : 14-02-94                                                 #
;#External modules :                                                          #
;#                                                                            #
;#Call sequence    : ql_refresh, dest, err                                    #
;#                                                                            #
;#Arguments        :dest: IMAGE or PROFILE                                    #
;#                  err : 0 if ok                                             #
;#                                                                            #
;#Description      :                                                          #
;#                                                                            #
;#                                                                            #
;##############################################################################
;*** 

PRO ql_refresh, dest, err                       

  ;============================================================================
  ;                       Common Block in use
  ;============================================================================
  COMMON widget_id_com
  COMMON curr_data_i_com
  COMMON curr_data_p_com
  COMMON const_com

  ;============================================================================
  ;                       Initialization
  ;============================================================================
  err = 0

  ;============================================================================
  ;                       Processing 
  ;============================================================================

   IF (dest EQ IMAGE ) THEN BEGIN
     WIDGET_CONTROL, work_draw, GET_VALUE=win_num
     WSET, win_num
     DEVICE, COPY=[0,0,IMAGE_X_SZ,IMAGE_Y_SZ,0,0,work_draw_back]
   ENDIF
   IF (dest EQ PROFILE) THEN BEGIN
     WIDGET_CONTROL, profile_draw, GET_VALUE=win_num
     WSET, win_num
     DEVICE, COPY=[0,0,PROFILE_X_SZ,PROFILE_Y_SZ,0,0,profile_draw_back]
   ENDIF
END
