Ignore:
Timestamp:
Mar 4, 2015, 12:01:38 AM (9 years ago)
Author:
sommeria
Message:

various bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/civ_input.m

    r876 r880  
    8383    set(handles.CheckThreshold,'Visible','on')
    8484    set(handles.CheckDeformation,'Value',0)% desactivate (work in progress)
    85     %set(handles.CheckDecimal,'Value',0)% desactivate (work in progress)
    8685end
    8786switch Param.Action.ActionName
     
    288287    if isequal(get(hhseries.REFRESH,'BackgroundColor'),[1 1 0]) &&...
    289288            ~(isfield(Param,'ActionInput') && isfield(Param.ActionInput,'ConfigSource'))
    290 %         answer=msgbox_uvmat('INPUT_Y-N',['import the civ parameters from the netcdf file']);
    291 %         if strcmp(answer,'Yes')
    292289            for index = 1:min(ind_opening,5)
    293290                set(handles.(ListOptions{index}),'value',0)
     
    300297            end
    301298            checkrefresh=1;
    302 %         end
    303299    end
    304300    if ind_opening>=3
     
    696692% in mode 'pair j1-j2', j1 and j2 are the file indices, else the indices
    697693% are relative to the reference indices ref_i and ref_j respectively.
    698 if isequal(mode,'pair j1-j2')%| isequal(mode,'st_pair j1-j2')
     694if isequal(mode,'pair j1-j2')
    699695    dt=1;
    700696    displ='';
     
    869865val=get(handles.ListCompareMode,'Value');
    870866compare=compare_list{val};
    871 if strcmp(compare,'displacement')||strcmp(compare,'shift')
    872     mode='displacement';
    873 else
     867if ~strcmp(compare,'displacement')%||strcmp(compare,'shift')
     868 
    874869    mode_list=get(handles.ListPairMode,'String');
    875870    mode_value=get(handles.ListPairMode,'Value');
     
    880875end
    881876nom_type_ima=CivInputData.NomTypeIma;
     877initial=get(handles.ListPairCiv1,'Value');%previous choice of pair
     878menu_pair=get(handles.ListPairCiv1,'String');%previous choice of pair.ListPairCiv1
     879init_choice=menu_pair{initial};
    882880
    883881%% determine nom_type_nc, nomenclature type of the .nc files:
     
    977975ichoice=find(select,1);% index of first selected pair
    978976if (isempty(ichoice) || ichoice < 1); ichoice=1; end;
    979 initial=get(handles.ListPairCiv1,'Value');%initial choice of pair
    980 if initial>nbpair || (numel(select)>=initial && ~isequal(select(initial),1))
     977ichoice=find(strcmp(init_choice,displ_pair'),1);
     978if ~isempty(ichoice)
    981979    set(handles.ListPairCiv1,'Value',ichoice);% first valid pair proposed by default in the menu
    982 end
     980else
     981   set(handles.ListPairCiv1,'Value',1)
     982end
     983% if initial>nbpair || (numel(select)>=initial && ~isequal(select(initial),1))
     984%     set(handles.ListPairCiv1,'Value',ichoice);% first valid pair proposed by default in the menu
     985% end
    983986
    984987%% determine the default selection in the pair menu for Civ2
Note: See TracChangeset for help on using the changeset viewer.