Changeset 332 for trunk/src/mouse_down.m


Ignore:
Timestamp:
Dec 13, 2011, 11:20:07 AM (13 years ago)
Author:
sommeria
Message:

NomType? changed from _i1-i2 ... to _1-2 ... (bugs to be expected!)
bug corrected in geometry_calib
series changed by introducing a from FileIndices?, introduction of find_file_series to detect the file series corresponding to an input file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_down.m

    r309 r332  
    2424function xy=mouse_down(hObject,eventdata)
    2525
    26 huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle which controls theoption of  mouse action
    27 if isempty(huvmat)
    28     return
    29 end
    30 hhuvmat=guidata(huvmat);%handles of elements in uvmat
    31 UvData=get(huvmat,'UserData');
     26AxeData=[];%default
    3227FigData=get(hObject,'UserData');
    3328if 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
     
    4136hhcurrentfig=guidata(hcurrentfig);
    4237if isfield(hhcurrentfig,'CheckZoom')
    43 test_zoom=get(hhcurrentfig.CheckZoom,'Value');%test for zoom action, first priority
     38    test_zoom=get(hhcurrentfig.CheckZoom,'Value');%test for zoom action, first priority
    4439else
    4540    test_zoom=0;
    4641end
    47 test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');%test for ruler  action, second priority;
    48 test_edit=get(hhuvmat.edit_object,'Value');%test for object editing, third priority
    49 test_edit_vect=get(hhuvmat.edit_vect,'Value');%test for vector editing,  priority 4
    50 test_create=isequal(get(hhuvmat.MenuObject,'checked'),'on');% test for object creation,  priority 5
    51 if test_create
    52     hset_object=findobj(allchild(0),'tag','set_object');
    53     test_create=~isempty(hset_object)&&~test_edit;
    54 end
    55 test_cal=isequal(get(hhuvmat.MenuCalib,'checked'),'on');% test for calibration
    56 if test_cal% test for calibration popints,  priority 6
    57     h_calib=findobj(allchild(0),'tag','geometry_calib');
    58     if isempty(h_calib)
    59         test_cal=0;
    60         set(hhuvmat.MenuCalib,'checked','off');% test for calibration off
    61     else
    62         hh_calib=guidata(h_calib);
    63         test_cal=get(hh_calib.edit_append,'Value');
    64     end
    65 end
    66 AxeData=[];%default
     42
     43%% look for parameters set by the GUI uvmat
     44test_ruler=0;
     45test_edit=0;
     46test_create=0;
     47huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle which controls theoption of  mouse action
     48if ~isempty(huvmat)
     49    hhuvmat=guidata(huvmat);%handles of elements in uvmat
     50    UvData=get(huvmat,'UserData');
     51    test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');%test for ruler  action, second priority;
     52    test_edit=get(hhuvmat.edit_object,'Value');%test for object editing, third priority
     53    test_edit_vect=get(hhuvmat.edit_vect,'Value');%test for vector editing,  priority 4
     54    test_create=isequal(get(hhuvmat.MenuObject,'checked'),'on');% test for object creation,  priority 5
     55    if test_create
     56        hset_object=findobj(allchild(0),'tag','set_object');
     57        test_create=~isempty(hset_object)&&~test_edit;
     58    end
     59    test_cal=isequal(get(hhuvmat.MenuCalib,'checked'),'on');% test for calibration
     60    if test_cal% test for calibration popints,  priority 6
     61        h_calib=findobj(allchild(0),'tag','geometry_calib');
     62        if isempty(h_calib)
     63            test_cal=0;
     64            set(hhuvmat.MenuCalib,'checked','off');% test for calibration off
     65        else
     66            hh_calib=guidata(h_calib);
     67            test_cal=get(hh_calib.edit_append,'Value');
     68        end
     69    end
     70end
    6771
    6872%% determine the currently selected items
Note: See TracChangeset for help on using the changeset viewer.