Changeset 974 for trunk/src/get_field.m


Ignore:
Timestamp:
Nov 18, 2016, 7:14:06 PM (7 years ago)
Author:
sommeria
Message:

aver synchro updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r924 r974  
    158158end
    159159set(handles.SwitchVarIndexTime,'String',ListSwitchVarIndexTime)
     160set(handles.SwitchVarIndexTime,'UserData',ListSwitchVarIndexTime); % keep string in memory for check3D
    160161set(handles.get_field,'UserData',Field);% record the finput field structure
    161162SwitchVarIndexTime_Callback([], [], handles)
     
    10451046else% fields studied as 2D
    10461047    status='off';
    1047  
    1048 end
     1048end
     1049
    10491050set(handles.Coord_z,'Visible',status)
    10501051% set(handles.CheckDimensionZ,'Visible',status)
    10511052set(handles.Z_title,'Visible',status)
    10521053set(handles.vector_z,'Visible',status)
    1053 set(handles.W_title,'Visible',status)   
    1054 if strcmp(status,'on')
    1055    Field=get(handles.get_field,'UserData');
    1056     if Field.MaxDim>=3% for 3D fields, propose to use the third variable as time
     1054set(handles.W_title,'Visible',status)
     1055if strcmp(status,'on')% ask for 3D input   
     1056    Field=get(handles.get_field,'UserData');
     1057    if Field.MaxDim>3% for 4D fields, propose to use the fourth variable as time
     1058        %set(handles.Time,'Visible','on')
    10571059        menu=get(handles.SwitchVarIndexTime,'String');
    10581060        val=find(strcmp('variable',menu));
    10591061        if ~isempty(val)
    10601062            set(handles.SwitchVarIndexTime,'Value',val)
    1061             SwitchVarIndexTime_Callback(handles.SwitchVarIndexTime,[], handles)
    1062         end
    1063     end
    1064 end
     1063        end
     1064    else
     1065        set(handles.SwitchVarIndexTime,'Value',1)
     1066        set(handles.SwitchVarIndexTime,'String',{'file index'})
     1067    end
     1068else
     1069   set(handles.SwitchVarIndexTime,'String',get(handles.SwitchVarIndexTime,'UserData'))
     1070end
     1071SwitchVarIndexTime_Callback(handles.SwitchVarIndexTime,[], handles)
     1072
    10651073%------------------------------------------------------------------------
    10661074% --- Executes on button press in OK.
Note: See TracChangeset for help on using the changeset viewer.