Changeset 523 for trunk/src/uvmat.m


Ignore:
Timestamp:
Aug 19, 2012, 11:40:34 AM (12 years ago)
Author:
sommeria
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r521 r523  
    207207transform_menu={'';'sub_field';'phys';'phys_polar'};
    208208UvData.OpenParam.NbBuiltin=numel(transform_menu); %number of functions
    209 path_list=(num2cell(blanks(UvData.OpenParam.NbBuiltin)))';%initialize a cell array of nbvar blanks
    210209transform_path=fullfile(path_uvmat,'transform_field');
    211210path_list{1}='';
    212 path_list(2:end)=regexprep(path_list(2:end),' ',transform_path); % set transform_path to the path_list
     211for ilist=2:UvData.OpenParam.NbBuiltin
     212path_list{ilist}=transform_path; % set transform_path to the path_list
     213end
    213214
    214215%% load the list of previously browsed files in menus Open, Open_1 and transform_fct
     
    217218 if exist(profil_perso,'file')
    218219     h=load (profil_perso);
    219      if isfield(h,'MenuFile')
     220     if isfield(h,'MenuFile')% load the menu of previously opened files
    220221         for ifile=1:min(length(h.MenuFile),5)
    221222             eval(['set(handles.MenuFile_' num2str(ifile) ',''Label'',h.MenuFile{ifile});'])
     
    223224         end
    224225     end
    225      if isfield(h,'transform_fct') && iscell(h.transform_fct)
     226     if isfield(h,'transform_fct') && iscell(h.transform_fct) % load the menu of transform fct set by user
    226227         for ilist=1:length(h.transform_fct);
    227228             if exist(h.transform_fct{ilist},'file')
     
    233234     end
    234235 end
    235 transform_menu=[transform_menu;{'more...'}];
    236 set(handles.transform_fct,'String',transform_menu)
    237 set(handles.transform_fct,'UserData',path_list)% store the list of path in UserData of ACTION
     236transform_menu=[transform_menu;{'more...'}];%append the option more.. to the menu
     237set(handles.transform_fct,'String',transform_menu)% display the menu of transform fcts
     238set(handles.transform_fct,'UserData',path_list)% store the corresponding list of path in UserData of uicontrol transform_fct
    238239set(handles.path_transform,'String','')
    239240set(handles.path_transform,'UserData',[])
     
    36043605    if exist(profil_perso,'file')
    36053606        nb_builtin=UvData.OpenParam.NbBuiltin;% number of 'builtin' (basic) transform fcts in uvmat
     3607        if nb_builtin<numel(list_path)
    36063608        for ilist=nb_builtin+1:numel(list_path)
    36073609            transform_fct{ilist-nb_builtin}=[fullfile(list_path{ilist},menu{ilist}) '.m'];
    36083610        end
    36093611        save (profil_perso,'transform_fct','-append'); %store the root name for future opening of uvmat
     3612        end
    36103613    end
    36113614end
     
    46834686    data.CoordType=UvData.CoordType;
    46844687end
    4685 % pos=get(handles.uvmat,'Position');
    4686 % pos(1)=pos(1)+pos(3)-0.311+0.04; %0.311= width of the geometry_calib interface (units relative to the srcreen)
    4687 % pos(2)=pos(2)-0.02;
    46884688[RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(handles);
    46894689FileName=[fullfile(RootPath,SubDir,RootFile) FileIndex FileExt];
Note: See TracChangeset for help on using the changeset viewer.