Changeset 177 for trunk/src/mouse_down.m


Ignore:
Timestamp:
Jan 7, 2011, 1:53:05 AM (13 years ago)
Author:
sommeria
Message:

bug with mouse object editing resolved. Display feature 'satus' for PIV task advancement introduced. Various bug repair and cleaning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_down.m

    r156 r177  
    2424function xy=mouse_down(hObject,eventdata)
    2525
    26 %MouseAction='none'; %default
    2726huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle which controls theoption of  mouse action
    2827if isempty(huvmat)
     
    3130hhuvmat=guidata(huvmat);%handles of elements in uvmat
    3231UvData=get(huvmat,'UserData');
    33 %MouseAction='none'; %default
    3432currentfig=hObject;
    3533hhcurrentfig=guidata(currentfig);
    3634test_zoom=get(hhcurrentfig.zoom,'Value');%test for zoom action, first priority
    37 % if isfield(UvData,'MouseAction')
    38 %     MouseAction=UvData.MouseAction;% get the mouse action from the uvmat GUI: options:
    39 % end
    40 
    41 %test_cal=get(handles.cal,'Value');
    42 % test_cal=strcmp(MouseAction,'calib');
    43 test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');%test for ruler  action, second priority
    44 %test_ruler=strcmp(MouseAction,'ruler');
    45 %test_edit=strcmp(MouseAction,'edit_object');
     35test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');%test for ruler  action, second priority;
    4636test_edit=get(hhuvmat.edit_object,'Value');%test for object editing, third priority
    47 %test_edit_vect=strcmp(MouseAction,'edit_vect');%test for vector editing,  priority 4
    4837test_edit_vect=get(hhuvmat.edit_vect,'Value');%test for vector editing,  priority 4
    4938test_create=isequal(get(hhuvmat.MenuObject,'checked'),'on');% test for object creation,  priority 5
     
    6352    end
    6453end
    65 %test_create=~test_zoom && strcmp(MouseAction,'create_object')&&~test_edit && ~test_edit_vect ;% || isequal(MouseAction,'create_mask'));
    6654xdisplay=[];%default
    6755ydisplay=[];%default
    6856AxeData=[];%default
    6957
    70 %% edit an existing point or line if found
     58%% determine the currently selected items
    7159hcurrentobject=gco;% current object handle (selected by the mouse)
    7260hcurrentfig=hObject;% current figure handle
    7361fig_tag=get(hcurrentfig,'Tag');
    74 tag_obj=get(gco,'Tag');
     62tag_obj=get(gco,'Tag');%tag of the currently selected object
    7563xy=[];%default
    7664xy_fig=get(hcurrentfig,'CurrentPoint');% current point of the current figure (gcbo)
     
    367355    end
    368356    if isequal(Field.FF(ivec),0)
    369         Field.FF(ivec)=100 %mark vector #ivec as false
     357        Field.FF(ivec)=100; %mark vector #ivec as false
    370358    else
    371359        Field.FF(ivec)=0;
Note: See TracChangeset for help on using the changeset viewer.