Changeset 425 for trunk


Ignore:
Timestamp:
May 17, 2012, 10:55:41 AM (13 years ago)
Author:
sommeria
Message:

improvement of object management

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_down.m

    r424 r425  
    324324        end
    325325        UvData.Object{IndexObj}=ObjectData;
    326         ListObject=get(hhuvmat.ListObject_1,'String');
     326        ListObject=get(hhuvmat.ListObject,'String');
    327327        UvData.Object{IndexObj}.DisplayHandle_uvmat=AxeData.CurrentObject;
    328328        ObjectNameNew=ObjectData.Name;
     
    353353        %set(hhuvmat.ListObject,'Value',[IndexObj_old(1) IndexObj])
    354354        set(hhuvmat.ListObject,'Value',IndexObj)
     355        set(hhuvmat.ViewObject,'Value',1)
    355356        %             if isempty(object_name)
    356357        %                 list_str{IndexObj}=[num2str(IndexObj) '-' ObjectData.Type];
  • trunk/src/mouse_up.m

    r413 r425  
    173173
    174174            end
     175            set(hhuvmat.ViewField,'Value',1);%
    175176            set(hhuvmat.edit_object,'BackgroundColor',[1 1 0]);% paint the edit text in yellow
    176177            set(hhuvmat.edit_object,'Value',1);%
  • trunk/src/update_obj.m

    r379 r425  
    2525%plot uvmat
    2626for iobj=1:length(Object_out) %change the view of all existing objects on the updated current object #IndexObj_1
    27      hobject=[];
     27    hobject=[];
    2828    if isfield(Object_out{iobj},'DisplayHandle_uvmat') && ~isempty(Object_out{iobj}.DisplayHandle_uvmat) && ishandle(Object_out{iobj}.DisplayHandle_uvmat)
    2929        hobject=Object_out{iobj}.DisplayHandle_uvmat;%graphic handle of object #iobj in the uvmat plot
    3030    end
    31     Object_out{iobj}.DisplayHandle_uvmat=plot_object(Object_out{iobj},Object_out{IndexObj_1},hobject,'m');%update the object representation of Object_out{iobj} on Object_out{IndexObj_1}
     31    if ~isequal(iobj,IndexObj_1)% object not visible when projected on itself
     32        Object_out{iobj}.DisplayHandle_uvmat=plot_object(Object_out{iobj},Object_out{IndexObj_1},hobject,'m');%update the object representation of Object_out{iobj} on Object_out{IndexObj_1}
     33        if isempty(Object_out{iobj}.DisplayHandle_uvmat)&&~isempty(hobject)
     34            delete(hobject)
     35        end
     36    end
    3237end
    3338% plot view_field
  • trunk/src/uvmat.m

    r424 r425  
    39423942function ListObject_1_Callback(hObject, eventdata, handles)
    39433943list_str=get(handles.ListObject_1,'String');
    3944 IndexObj=get(handles.ListObject_1,'Value');
    39453944UvData=get(handles.uvmat,'UserData');
    39463945ObjectData=UvData.Object{get(handles.ListObject_1,'Value')};
     
    39493948ProjData= proj_field(UvData.Field,ObjectData);%project the current interface field on UvData.Object{IndexObj(1)}
    39503949plot_field(ProjData,handles.axes3,read_GUI(handles.uvmat));%read plotting parameters on the uvmat interfacPlotHandles);
     3950Object_out=update_obj(UvData,get(handles.ListObject_1,'Value'),[])
    39513951
    39523952%% display the object parameters if the GUI set_object is already opened
    3953 hset_object=findobj(allchild(0),'tag','set_object');
    3954 if ~isempty(hset_object)
     3953% hset_object=findobj(allchild(0),'tag','set_object');
     3954%if ~isempty(hset_object)
     3955if ~get(handles.ViewObject,'Value')
    39553956%     delete(hset_object)% delete to refesh the content
    39563957    ZBounds=0; % default
     
    39593960        ZBounds(2)=UvData.Field.ZMax;%maximum for the Z slider
    39603961    end
    3961     ObjectData.Name=list_str{IndexObj};
     3962    ObjectData.Name=list_str{get(handles.ListObject_1,'Value')};
    39623963    set_object(ObjectData,[],ZBounds);
    39633964    set(handles.ViewObject,'Value',1)% show that the selected object in ListObject_1 is currently visualised
     
    44734474    delete(handles.UVMAT_title)%delete the initial display of uvmat if no field has been entered
    44744475end
    4475 set(handles.ListObject,'Visible','on')
    4476 set(handles.ViewField,'Visible','on')
    4477 set(handles.ViewField,'Value',1) % indicate that the object selected in ListObject (projection oin view_field) is visualised
    4478 set(handles.ViewObject,'Value',0)% then the object selected in ListObject_1 is not visualised
     4476
     4477%set(handles.ViewField,'Value',1) % indicate that the object selected in ListObject (projection oin view_field) is visualised
     4478%set(handles.ViewObject,'Value',1)% then the object selected in ListObject_1 is not visualised
    44794479hset_object=set_object(data,handles);% call the set_object interface
    44804480hhset_object=guidata(hset_object);
  • trunk/src/view_field.m

    r413 r425  
    113113if ~isempty(huvmat)
    114114    hhuvmat=guidata(huvmat);
    115     set(hhuvmat.edit_object,'Value',0)
    116     set(hhuvmat.edit_object,'BackgroundColor',[0.7 0.7 0.7])%put unactivated buttons to gree
     115    set(hhuvmat.ViewField,'Value',0)
     116    %set(hhuvmat.edit_object,'BackgroundColor',[0.7 0.7 0.7])%put unactivated buttons to gree
    117117    % deselect the object in ListObject when view_field is closed
    118118    if isempty(findobj(allchild(0),'Tag','set_object'))
Note: See TracChangeset for help on using the changeset viewer.