source: trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefield.pro @ 134

Last change on this file since 134 was 134, checked in by navarro, 18 years ago

change *.pro file properties (del eof-style, del executable, set keywords Id

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1PRO changefield, base, newfieldname, BOXZOOM = boxzoom
2;
3;
4  compile_opt idl2, strictarrsubs
5;
6  widget_control, base, get_uvalue = top_uvalue
7;
8; Change exextra :
9  exextra = definedefaultextra(newfieldname)
10  specifieid = widget_info(base, find_by_uname = 'specifie')
11  widget_control, specifieid, set_value = exextra
12; Change the variable -> Do we need to change the vertical axis
13; according to the tye of points (T or W)?
14  dthlv1id = widget_info(base, find_by_uname = 'dthlv1')
15  widget_control, dthlv1id, get_uvalue = dthlv1_uval
16  oldzgridt = dthlv1_uval.grid_t
17; get the type of point
18  currentfile = extractatt(top_uvalue, 'currentfile')
19  listgrid = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listgrid
20  listvar = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listvar
21;   for i = 0,  n_elements(listvar)-1 do print,  listvar[i], '/', listgrid[i]
22  indexvar = where(listvar EQ newfieldname)
23  indexvar = 0 > indexvar[0]
24  zgridt = strupcase(listgrid[indexvar]) NE 'W'
25; if we change the type of point
26  if zgridt NE oldzgridt then BEGIN
27; update dthlv1_uval.grid_t
28    dthlv1_uval.grid_t = zgridt
29    widget_control, dthlv1id, set_uvalue = dthlv1_uval
30; update cw_domain
31    if NOT keyword_set(boxzoom) THEN $
32       widget_control, widget_info(base, find_by_uname = 'domain'), get_value = boxzoom
33    widget_control, widget_info(base, find_by_uname = 'domain'), set_value = boxzoom
34  endif
35;
36  return
37end
Note: See TracBrowser for help on using the repository browser.