Changeset 955 for trunk/src/set_object.m


Ignore:
Timestamp:
Jun 22, 2016, 7:54:40 PM (5 years ago)
Author:
sommeria
Message:

various

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/set_object.m

    r954 r955  
    119119    Type_Callback(hObject, eventdata, handles)% update the GUI set_object depending on the object type   
    120120    set(handles.REFRESH,'BackgroundColor',[1 0 0])
    121     if isfield(data,'RangeZ') && length(ZBounds) >= 2
     121    if isfield(data,'RangeZ')
    122122        set(handles.num_RangeZ_2,'String',num2str(max(data.RangeZ),3))
    123         DZ=max(data.RangeZ);%slider step
    124         if ~isnan(ZBounds(1)) && ZBounds(2)~=ZBounds(1)
    125             rel_step(1)=min(DZ/(ZBounds(2)-ZBounds(1)),0.2);%must be smaller than 1
    126             rel_step(2)=0.1;
    127             set(handles.z_slider,'Visible','on')
    128             set(handles.z_slider,'Min',ZBounds(1))
    129             set(handles.z_slider,'Max',ZBounds(2))
    130             set(handles.z_slider,'SliderStep',rel_step)
    131             set(handles.z_slider,'Value',(ZBounds(1)+ZBounds(2))/2)
     123        if length(ZBounds) >= 2
     124            DZ=max(data.RangeZ);%slider step
     125            if ~isnan(ZBounds(1)) && ZBounds(2)~=ZBounds(1)
     126                rel_step(1)=min(DZ/(ZBounds(2)-ZBounds(1)),0.2);%must be smaller than 1
     127                rel_step(2)=0.1;
     128                set(handles.z_slider,'Visible','on')
     129                set(handles.z_slider,'Min',ZBounds(1))
     130                set(handles.z_slider,'Max',ZBounds(2))
     131                set(handles.z_slider,'SliderStep',rel_step)
     132                set(handles.z_slider,'Value',(ZBounds(1)+ZBounds(2))/2)
     133            end
    132134        end
    133135    end
     
    281283ObjectStyle=menu{value};
    282284%%%%%%%%% TODO
    283 test3D=0; %TODO: update  test3D=isequal(get(handles.ZObject,'Visible'),'on');%3D case
     285test3D=strcmp(ObjectStyle,'plane_z'); %TODO: generalize
    284286%%%%%%%%%
    285287%default setting
Note: See TracChangeset for help on using the changeset viewer.