Ignore:
Timestamp:
Feb 1, 2011, 1:07:28 AM (13 years ago)
Author:
sommeria
Message:

various bug repairs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_motion.m

    r173 r187  
    2828    return
    2929end
    30 currentfig=hObject;
     30FigData=get(hObject,'UserData');
     31if ishandle(FigData)% case of a zoom plot, the handle of the parent rectangle is stored in UserData, its parent is the plotting axes of the rectangle
     32    currentfig=get(get(FigData,'parent'),'parent');
     33else
     34    currentfig=hObject;%usual plot
     35end
    3136hhcurrentfig=guidata(currentfig);
    3237test_zoom=get(hhcurrentfig.zoom,'Value');%test for zoom activated on the current figure
     
    6166pointershape='arrow';% default pointer is an arrow
    6267
    63 xy_fig=get(currentfig,'CurrentPoint');% current point of the current figure (gcbo)
    64 hchild=get(currentfig,'Children');%handles of all objects in the current figure
     68xy_fig=get(hObject,'CurrentPoint');% current point of the current figure (gcbo)
     69hchild=get(hObject,'Children');%handles of all objects in the current figure
    6570
    6671%% loop on all the objects in the current figure and detect whether the mouse is over a plot  axes
     
    7479        htype=get(hchild(ichild),'Type');%type of the crrent child
    7580        %if the mouse is over an axis, look at the data
    76         if isequal(htype,'axes')
     81        if strcmp(htype,'axes')
    7782            haxes=hchild(ichild);
    7883            xy=get(haxes,'CurrentPoint');%xy(1,1),xy(1,2): current x,y positions in axes coordinates
     
    144149                                    VarName=Field.ListVarName{CellVarIndex{icell}(1)};
    145150                                    eval(['nxy=size(Field.' VarName ');']);
    146 %                                     nxy(1)=numel(y);
    147 %                                     nxy(2)=numel(x);
    148151                                    MaxAY=max(y(1),y(end)); %#ok<COLND>
    149152                                    MinAY=min(y(1),y(end)); %#ok<COLND>
Note: See TracChangeset for help on using the changeset viewer.