Changeset 102 for trunk/src/set_object.m


Ignore:
Timestamp:
Jun 13, 2010, 11:32:05 PM (15 years ago)
Author:
sommeria
Message:

bugs corrected for projection objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/set_object.m

    r82 r102  
    1515%    .RangeX, RangeY
    1616%    .Coord(j,i), i=1, 2, 3,  components x, y, z of j=1...n position(s) characterizing the object components
    17 % PlotHandles: handles for projection plots
     17% PlotHandles: handles for projection plots NO MORE USED
    1818% Zbounds: bounds on Z ( 3D case)
    1919%
     
    8585set(hObject,'KeyPressFcn',{'keyboard_callback',handles})%set keyboard action function (allow action on uvmat when set_object is in front)
    8686set(handles.MenuCoord,'ListboxTop',1)
    87 if ~exist('PlotHandles','var')
    88      PlotHandles=[];
    89 end
     87% if ~exist('PlotHandles','var')
     88%      PlotHandles=[];
     89% end
    9090enable_plot=0;%default: does not allow plot of object and projection
    9191% SetData.PlotHandles=PlotHandles;
     
    9999    if isfield(data,'Name')
    100100        set(handles.TITLE,'String',data.Name)
    101         set(hObject,'name',data.Name)
     101%         set(hObject,'name',data.Name)
    102102    end
    103103    if ~isfield(data,'NbDim')||~isequal(data.NbDim,3)%2D case
     
    776776UvData=get(huvmat,'UserData');%Data associated to the GUI uvmat
    777777hhuvmat=guidata(huvmat);%handles in the uvmat GUI
    778 ObjectName=get(handles.set_object,'name');%name ome)f the current object (set_object na
     778ObjectName=get(handles.TITLE,'String');%name ome)f the current object (set_object na
    779779ListObject=get(hhuvmat.list_object_1,'String');%position in the objet list
    780780IndexObj_1=get(hhuvmat.list_object_1,'Value');
     
    785785PlotHandles=[];%default
    786786testnew=0;
     787PlotHandles=get_plot_handles(hhuvmat);
    787788if strcmp(ListObject{IndexObj_1},ObjectName)% we are editing the object whose projection is viewed in the uvmat frame
    788789   ObjectData.HandlesDisplay=hhuvmat.axes3;
    789     PlotHandles=get_plot_handles(hhuvmat);
    790790    IndexObj=IndexObj_1;
    791791elseif IndexObj_2<=numel(ListObject)&& strcmp(ListObject{IndexObj_2},ObjectName)% we are editing the object whose projection is viewed in view_field
     
    793793    if ~isempty(hview_field)
    794794        PlotHandles=guidata(hview_field);
    795 %         PlotHandles=get_plot_handles( hhview_field);
    796795        ObjectData.HandlesDisplay=PlotHandles.axes3;%handle of axes3 in view_field
    797796    end
     
    806805%     set(hhuvmat.list_object_2,'Value',IndexObj)
    807806end
    808 ObjectName=get(handles.TITLE,'String');
     807% ObjectName=get(handles.TITLE,'String');
    809808if length(ObjectName)<1
    810809    ObjectName=[num2str(IndexObj) '-' ObjectData.Style];
     
    820819set(hhuvmat.list_object_1,'String',ListObject)
    821820set(hhuvmat.list_object_2,'String',[ListObject;{'...'}])
    822 set(handles.set_object,'name',ObjectName);%update the name of set_object so that it equals its corresponding object in the list
    823821if testnew
    824822    set(hhuvmat.list_object_2,'Value',IndexObj)
    825823end
    826 % ObjectData.HandlesDisplay=[]; % new object plot by default
    827 % if length(UvData.Object) >= IndexObj && isfield(UvData.Object{IndexObj},'HandlesDisplay')
    828 %     hdisplay=UvData.Object{IndexObj}.HandlesDisplay;
    829 %     if isequal(UvData.Object{IndexObj}.Style, ObjectData.Style) && isequal(UvData.Object{IndexObj}.ProjMode, ObjectData.ProjMode)
    830 %         ObjectData.HandlesDisplay=UvData.Object{IndexObj}.HandlesDisplay;
    831 %     else  % for a new object styl, delete the existing object plots
    832 %         for ih=1:length(hdisplay)
    833 %             PlotData=get(hdisplay(ih),'UserData');
    834 %             if isfield(PlotData,'SubObject') & ishandle(PlotData.SubObject)
    835 %                     delete(PlotData.SubObject);
    836 %             end
    837 %             if isfield(PlotData,'DeformPoint') & ishandle(PlotData.DeformPoint)
    838 %                    delete(PlotData.DeformPoint);
    839 %             end
    840 %             if ~isequal(hdisplay(ih),0)
    841 %                 delete(hdisplay(ih));
    842 %             end
    843 %         end
    844 %         if isfield(ObjectData,'plotaxes') && ishandle(ObjectData.plotaxes)
    845 %             delete(ObjectData.plotaxes)%delete the axes for plotting the current projection result
    846 %         end
    847 %     end     
    848 % end
    849824
    850825% update the object plot and projection field
    851826UvData.Object{IndexObj}=update_obj(UvData,IndexObj,ObjectData,PlotHandles);
    852 
    853827set(huvmat,'UserData',UvData)%update the data in the uvmat interface
    854 % list_str=get(hlist_object,'String');
    855 % list_str{IndexObj}=[num2str(IndexObj) '-' ObjectData.Style];
    856 % set(hlist_object_1,'String',list_str)
    857 % set(hlist_object_1,'Value',IndexObj)
    858828
    859829%set uvmat to object edit mode to allow further object update
Note: See TracChangeset for help on using the changeset viewer.