Changeset 701 for trunk


Ignore:
Timestamp:
Dec 13, 2013, 10:51:21 PM (10 years ago)
Author:
sommeria
Message:

several bugs repaired

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_imadoc.m

    r674 r701  
    1717        XmlFileName=fullfile(RootPath,[SubDir(1:dotchar(end-idot+1)-1) '.xml']);
    1818        if exist(XmlFileName,'file')
    19             SubDirBase=fullfile(RootPath,SubDir(1:dotchar(end-idot+1)));
     19            SubDirBase=fullfile(RootPath,SubDir(1:dotchar(end-idot+1)-1));
    2020            break
    2121        end
  • trunk/src/get_field.m

    r693 r701  
    9797        check_singleton(idim)=isequal(Field.DimValue(dim_index),1);%check_singleton=1 for singleton
    9898    end
    99     Field.Check0D(ilist)=(isequal(check_singleton,ones(1,NbDim)))||(~isequal(Field.VarType(ilist),4)&&~isequal(Field.VarType(ilist),5));% =1 if the variable reduces to a single value
     99    Field.Check0D(ilist)=(isequal(check_singleton,ones(1,NbDim)))||(~isequal(Field.VarType(ilist),4)&&~isequal(Field.VarType(ilist),5)&&~isequal(Field.VarType(ilist),6));% =1 if the variable reduces to a single value
    100100    if ~Field.Check0D(ilist)
    101101    Field.Display.VarDimName{ilist}=Field.VarDimName{ilist}(~check_singleton);% eliminate singletons in the list of variable dimensions
     
    495495y_index=get(handles.ordinate,'Value');
    496496y_menu=get(handles.ordinate,'String');
     497if isempty(y_menu)
     498    return
     499else
    497500YName=y_menu{y_index};
     501end
    498502
    499503%% set list of possible coordinates
  • trunk/src/mouse_motion.m

    r699 r701  
    5050test_zoom_draw=0;
    5151test_object=0; %test for object editing or creation
     52test_create_object=0;
    5253test_edit_object=0;% edit test for mouse shape: an arrow
    5354test_ruler=0;%test for active ruler
     
    5657if ~isempty(huvmat)
    5758    hhuvmat=guidata(huvmat);%handles of the elements in uvma
     59    test_create_object=strcmp(get(hhuvmat.MenuObject,'checked'),'on');
    5860    test_edit_object=get(hhuvmat.CheckEditObject,'Value');
    5961    test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');
     
    109111    test_zoom_draw=test_draw && isequal(AxeData.Drawing,'zoom')&& isfield(AxeData,'CurrentOrigin') && isequal(get(gcf,'SelectionType'),'normal');
    110112    test_object=test_draw && isfield(AxeData,'CurrentObject') && ~isempty(AxeData.CurrentObject) && ishandle(AxeData.CurrentObject);
    111     if ~test_edit_object  && ~test_ruler
     113    if CheckZoom
     114           pointershape='zoom';
     115    elseif CheckZoomFig
     116            pointershape='zoomfig';
     117    elseif ~test_edit_object  && ~test_ruler
    112118        if CheckZoom
    113119           pointershape='zoom';
    114         elseif CheckZoomFig
    115             pointershape='zoomfig';
    116         elseif test_draw
    117             pointershape='crosshair';%set pointer with cross shape (default when mouse is over an axis)
     120        elseif test_draw|| test_create_object
     121            pointershape='crosshair';%set pointer with cross shape
    118122        else
    119         pointershape='fullcross';%set pointer with cross shape (default when mouse is over an axis)
     123        pointershape='fullcross';%set pointer with large cross (default when mouse is over an axis)
    120124        end
    121125    end
  • trunk/src/mouse_up.m

    r699 r701  
    9696                if size(ObjectData.Coord,1)==1 % this is the mouse up for the first point, continue until next click
    9797                    check_multiple=1;
    98                 else
    99                     %ObjectData.Coord=[ObjectData.Coord ;CurrentOrigin];% append the second point of the line (the last pointed position during mouse down)
    10098                end
    10199            case {'rectangle','ellipse','volume'}
    102                 %                  if size(ObjectData.Coord,1)==1 % this is the mouse up for the first point, continue until next click
    103                 %                     check_multiple=1;
    104                 %                  else
    105100                ObjectData.Coord=(CurrentOrigin+xy(1,1:2))/2;% keep only the first point coordinate
    106101                ObjectData.RangeX=abs(ObjectData.Coord(1,1)-xy(1,1));%rectangle width
     
    109104                    check_multiple=1;% pass to next mous up if width of height=0
    110105                end
    111                 %                 ObjectData.Coord(1,1)=(xy(1,1)+XYData(1))/2;%origin rectangle, x coordinate
    112                 %                 ObjectData.Coord(1,2)=(xy(1,2)+XYData(2))/2;
    113                 %                 ObjectData.RangeX=abs(xy(1,1)-XYData(1))/2;%rectangle width
    114                 %                 ObjectData.RangeY=abs(xy(1,2)-XYData(2))/2;%rectangle height
    115                 %                  end
    116106            case 'plane' %case of 'plane'
    117107                DX=(xy(1,1)-ObjectData.Coord(1,1));
     
    130120   
    131121    %show object coordinates in the GUI set_object
    132     %     h_set_object=findobj(allchild(0),'Tag','set_object');
    133     %     hh_set_object=guidata(h_set_object);
    134     %     set(hh_set_object.Coord,'Data',ObjectData.Coord);
    135122    if strcmp(ObjectData.Type,'rectangle')||strcmp(ObjectData.Type,'ellipse')
    136123        set(hh_set_object.num_RangeX_2,'String',num2str(ObjectData.RangeX,4));
     
    179166            end
    180167            set(hhuvmat.CheckViewField,'Value',1);%
    181             set(hhuvmat.CheckEditObject,'Value',1);%           
     168            set(hhuvmat.CheckEditObject,'Value',1);%   
     169            set(hhuvmat.MenuObject,'checked','off'); %desactivate object creation mode
    182170            set(hhuvmat.CheckEditObject,'Enable','on');%
    183171            set(get(h_set_object,'children'),'Enable','on')
  • trunk/src/uvmat.m

    r699 r701  
    19531953        Field_a=transform(Field_a,UvData.XmlData{index});%the first field has been stored without transform
    19541954        end
     1955        if nargin(transform)>=2
    19551956        Field_b=transform(Field_b,UvData.XmlData{index});
     1957        else
     1958          Field_b=transform(Field_b);
     1959        end
    19561960    end
    19571961end
     
    42424246if get(handles.CheckEditObject,'Value')
    42434247    %suppress the other options
     4248    set(handles.MenuObject,'checked','off')
    42444249    set(handles.CheckZoom,'Value',0)
    42454250    CheckZoom_Callback(hObject, eventdata, handles)
     
    43904395            if ishandle(hdisplay(iview)) && ~isequal(hdisplay(iview),0)
    43914396                ObjectData=get(hdisplay(iview),'UserData');
    4392                 if isfield(ObjectData,'SubObject') && ishandle(ObjectData.SubObject)
    4393                     delete(ObjectData.SubObject);% delete the graphic 'sub-objects (e.g. projection bounds)
     4397                if isfield(ObjectData,'SubObject') && ~isempty(ObjectData.SubObject)
     4398                    delete(ObjectData.SubObject(ishandle(ObjectData.SubObject)));% delete the graphic 'sub-objects (e.g. projection bounds)
    43944399                end
    4395                 check_suppress= isfield(ObjectData,'DeformPoint') && ishandle(ObjectData.DeformPoint);
    4396                 delete(ObjectData.DeformPoint(check_suppress));% delete the graphic deformation points
    4397                 delete(hdisplay(iview))% delete the main graphic representation of the object
     4400                if isfield(ObjectData,'DeformPoint')&& ~isempty(ObjectData.DeformPoint)
     4401                    delete(ObjectData.DeformPoint(ishandle(ObjectData.DeformPoint)));% delete the graphic deformation points
     4402                    delete(hdisplay(iview))% delete the main graphic representation of the object
     4403                end
    43984404            end
    43994405            ishandle(hdisplay(iview))
     
    47134719set(handles.CheckZoomFig,'Value',0) %desactivate zoom sub fig
    47144720set(handles.CheckZoom,'Value',0)    %desactivate the zoom action
     4721set(handles.MenuObject,'checked','on')% indicate object creation for mouse pointer display
    47154722if ishandle(handles.UVMAT_title)
    47164723    delete(handles.UVMAT_title)     %delete the initial display of uvmat if no field has been entered yet
Note: See TracChangeset for help on using the changeset viewer.