Changeset 67 for trunk/src/mouse_up.m


Ignore:
Timestamp:
Mar 25, 2010, 6:48:48 PM (11 years ago)
Author:
sommeria
Message:

civ: RUN civ lounched out of the Matlab work space. RUN and BATCH now runned by a unique sub-function lounch.m.
FiLE PARAM.xml modified to provide different paths for Batch and Run !!!!!
RUN_FIX: minor error message modif
geometry_calib: calib point editing by the mouse
improvement of the interactions between the different GUIs. Close function...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_up.m

    r61 r67  
    3737    zoomstate=get(hhuvmat.zoom,'Value');
    3838end
    39 if isequal(MouseAction,'calib') && ~zoomstate
    40     return
    41 end
     39% if isequal(MouseAction,'calib') && ~zoomstate
     40%     return
     41% end
    4242currentfig=gcbo;
    4343AxeData=get(gca,'UserData');
     
    138138            set(hhuvmat.edit,'Value',1);%
    139139            set(hhuvmat.edit,'Enable','on');%
     140            set(hhuvmat.MenuEditObject,'Enable','on');%
    140141            set(hhuvmat.MenuEdit,'Enable','on');%
    141             set(hhuvmat.MenuEdit,'Enable','on');%
    142             set(hhuvmat.MenuObject,'Enable','on');%
     142%             set(hhuvmat.MenuObject,'Enable','on');%
    143143            UvData.MouseAction='edit_object'; % set the edit button to 'on'
    144144        end
     
    261261      end
    262262end
    263 if isequal(MouseAction,'ruler')
     263
     264% editing calibration point
     265if strcmp(MouseAction,'calib')
     266    xy=get(currentaxes,'CurrentPoint');%xy(1,1),xy(1,2): current x,y positions in axes coordinates
     267    hh=findobj('Tag','calib_points')%look for handle of calibration points           
     268    if ~isempty(hh)
     269        set(hh,'UserData',[])%remove edit mode
     270    end   
     271    strline=[ '    |    '  '    |    '  '    |    ' num2str(xy(1,1),4) '    |    ' num2str(xy(1,2),4)];
     272    h_geometry_calib=findobj(allchild(0),'Name','geometry_calib'); %find the geomterty_calib GUI
     273    hh_geometry_calib=guidata(h_geometry_calib);
     274    h_ListCoord=hh_geometry_calib.ListCoord; %findobj(h_geometry_calib,'Tag','ListCoord');
     275    Coord=get(h_ListCoord,'String');
     276    val=get(h_ListCoord,'Value');
     277%     if length(Coord)>=val
     278%         Coord(val+1:length(Coord)+1)=Coord(val:length(Coord));% push the list forward beyond the current point
     279%     end
     280    Coord{val}=strline;
     281    set(h_ListCoord,'String',Coord)
     282    %set(h_ListCoord,'Value',val+1)
     283    %geometry_calib('ListCoord_Callback',hObject,eventdata,hh_geometry_calib)
     284    %data=read_geometry_calib(Coord);%transform char cell to numbers
     285    %XCoord=data.Coord(:,4);
     286    %YCoord=data.Coord(:,5)
     287end
     288
     289% finalising ruler
     290if strcmp(MouseAction,'ruler')
    264291    UvData.MouseAction='none';
    265292    UvData=rmfield(UvData,'RulerHandle');
Note: See TracChangeset for help on using the changeset viewer.