Changeset 379 for trunk/src/mouse_down.m


Ignore:
Timestamp:
Jan 27, 2012, 1:59:18 AM (13 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_down.m

    r342 r379  
    9090    if xy_fig(1) >=obj_pos(1) & xy_fig(2) >= obj_pos(2)& xy_fig(1) <=obj_pos(1)+obj_pos(3) & xy_fig(2) <= obj_pos(2)+obj_pos(4);
    9191        htype=get(hchild,'Type');%type of object child of the current figure
    92 
    9392        switch htype
    9493            %if the mouse is over an axis, look at the data
     
    169168
    170169%% delete the current zoom rectangle
    171 if isfield(AxeData,'CurrentRectZoom') & ishandle(AxeData.CurrentRectZoom)
     170if isfield(AxeData,'CurrentRectZoom') && ishandle(AxeData.CurrentRectZoom)
    172171    delete(AxeData.CurrentRectZoom)
    173172    AxeData.CurrentRectZoom=[];
     
    294293        hset_object=findobj(allchild(0),'tag','set_object');
    295294        if ~isempty(hset_object)
    296             sethandles=guidata(hset_object);
    297             ObjectData=read_set_object(sethandles); %read object features in the GUI set_object
     295            %ObjectData=read_set_object(sethandles); %read object features in the GUI set_object
     296            ObjectData=read_GUI(hset_object);
    298297            ObjectData.Coord=[]; %reset previous object coordinates
    299298            ObjectData.Coord(1,1)=xy(1,1);
    300299            ObjectData.Coord(1,2)=xy(1,2);
    301             ObjectData.Coord(1,3)=0;
     300%             ObjectData.Coord(1,3)=0;
    302301            if isfield(AxeData,'ObjectCoord') & size(AxeData.ObjectCoord,2)==3
    303302                 ObjectData.Coord(1,3)=AxeData.ObjectCoord(1,3); %generaliser au cas avec angle
     
    314313            set(hhuvmat.ListObject,'Value',[IndexObj_old(1) IndexObj] );
    315314            UvData.Object{IndexObj}.DisplayHandle_uvmat=AxeData.CurrentObject;
    316             object_name=get(sethandles.TITLE,'String');
    317             if isempty(object_name)|| strcmp(object_name,'')
    318                 list_str{IndexObj}=[num2str(IndexObj) '-' ObjectData.Style];
    319                 set(sethandles.TITLE,'String',list_str{IndexObj})
     315            object_name=ObjectData.Name;
     316            sethandles=guidata(hset_object);
     317            if isempty(object_name)
     318                list_str{IndexObj}=[num2str(IndexObj) '-' ObjectData.Type];
     319                set(sethandles.Name,'String',list_str{IndexObj})
    320320            else
    321321               list_str{IndexObj}=object_name;
Note: See TracChangeset for help on using the changeset viewer.