pro resetbases @pltdat.h ; ; Reset widget bases for new frame or new file: ; widget_control,mapbase,bad_id=badid,/destroy widget_control,conimagebase,bad_id=badid,/destroy widget_control,xylinebase,bad_id=badid,/destroy widget_control,finderbase,bad_id=badid,/destroy widget_control,gotobase,bad_id=badid,/destroy widget_control,gotobase,bad_id=badid,/destroy widget_control,contbase,bad_id=badid,/destroy cont.cmin = 0. & cont.cmax = 0. & cont.cint = 0. widget_control,imconbase,map=0 ; image, contour, image+contour widget_control,typebase,/map ; maps, contour/image, x/y for i=0,2 do widget_control,wb_types(i),set_button=0,sensitive=1 if frame.nx le 1 or frame.ny le 1 then begin ; xy line frame widget_control,wb_types(0),sensitive=0 ; turn off maps widget_control,wb_types(1),sensitive=0 ; turn off contours endif else begin ; contour frame widget_control,wb_types(2),sensitive=0 ; turn off xy line endelse return end