Ignore:
Timestamp:
Jan 27, 2012, 1:59:18 AM (12 years ago)
Author:
sommeria
Message:

several bugs corrected
set_object.fig rationalized so that read_set_object is replaced by the rgeneral fct read_GUI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_motion.m

    r315 r379  
    4242test_zoom_draw=0; % test for zoom drawing
    4343test_ruler=0;%test for active ruler
    44 test_piv=0;% test for PIV correlation display
     44% test_piv=0;% test for PIV correlation display
    4545huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle
    4646if ~isempty(huvmat)
     
    5858    test_piv=1;
    5959end
    60 % hciv=findobj(allchild(0),'tag','civ');%find the civ interface handle
    61 % if ~isempty(hciv) && strcmp(get(currentfig,'tag'),'view_field')
    62 %     hhciv=guidata(hciv);
    63 %     test_piv =get(hhciv.TestCiv1,'Value');
    64 % end
    6560
    6661%find the current axe 'haxes' and display the current mouse position or uicontrol tag
     
    327322        XYData=AxeData.CurrentOrigin;
    328323        if isequal(AxeData.Drawing,'create') && isfield(AxeData,'CurrentOrigin') && ~isempty(AxeData.CurrentOrigin)
    329            if strcmp(ObjectData.Style,'line')||strcmp(ObjectData.Style,'polyline')||strcmp(ObjectData.Style,'polygon')||strcmp(ObjectData.Style,'points')
    330               xy(1,3)=0;
    331               ObjectData.Coord=[ObjectData.Coord ;xy(1,:)];
     324           if strcmp(ObjectData.Type,'line')||strcmp(ObjectData.Type,'polyline')||strcmp(ObjectData.Type,'polygon')||strcmp(ObjectData.Type,'points')
     325              ObjectData.Coord=[ObjectData.Coord ;xy(1,1:2)];
    332326             % ObjectData.Coord(end,:)=xy(1,:);
    333            elseif strcmp(ObjectData.Style,'rectangle')||strcmp(ObjectData.Style,'ellipse')||strcmp(ObjectData.Style,'volume')
     327           elseif strcmp(ObjectData.Type,'rectangle')||strcmp(ObjectData.Type,'ellipse')||strcmp(ObjectData.Type,'volume')
    334328              ObjectData.Coord(1,1)=(xy(1,1)+XYData(1))/2;%origin rectangle, x coordinate
    335329              ObjectData.Coord(1,2)=(xy(1,2)+XYData(2))/2;
    336330              ObjectData.RangeX=abs(xy(1,1)-XYData(1))/2;%rectangle width
    337331              ObjectData.RangeY=abs(xy(1,2)-XYData(2))/2;%rectangle height
    338            elseif isequal(ObjectData.Style,'plane') %case of 'plane'
     332           elseif isequal(ObjectData.Type,'plane') %case of 'plane'
    339333                DX=(xy(1,1)-ObjectData.Coord(1,1));
    340334                DY=(xy(1,2)-ObjectData.Coord(1,2));
Note: See TracChangeset for help on using the changeset viewer.