Changeset 102 for trunk/src/set_object.m
- Timestamp:
- Jun 13, 2010, 11:32:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/set_object.m
r82 r102 15 15 % .RangeX, RangeY 16 16 % .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 18 18 % Zbounds: bounds on Z ( 3D case) 19 19 % … … 85 85 set(hObject,'KeyPressFcn',{'keyboard_callback',handles})%set keyboard action function (allow action on uvmat when set_object is in front) 86 86 set(handles.MenuCoord,'ListboxTop',1) 87 if ~exist('PlotHandles','var')88 PlotHandles=[];89 end87 % if ~exist('PlotHandles','var') 88 % PlotHandles=[]; 89 % end 90 90 enable_plot=0;%default: does not allow plot of object and projection 91 91 % SetData.PlotHandles=PlotHandles; … … 99 99 if isfield(data,'Name') 100 100 set(handles.TITLE,'String',data.Name) 101 set(hObject,'name',data.Name)101 % set(hObject,'name',data.Name) 102 102 end 103 103 if ~isfield(data,'NbDim')||~isequal(data.NbDim,3)%2D case … … 776 776 UvData=get(huvmat,'UserData');%Data associated to the GUI uvmat 777 777 hhuvmat=guidata(huvmat);%handles in the uvmat GUI 778 ObjectName=get(handles. set_object,'name');%name ome)f the current object (set_object na778 ObjectName=get(handles.TITLE,'String');%name ome)f the current object (set_object na 779 779 ListObject=get(hhuvmat.list_object_1,'String');%position in the objet list 780 780 IndexObj_1=get(hhuvmat.list_object_1,'Value'); … … 785 785 PlotHandles=[];%default 786 786 testnew=0; 787 PlotHandles=get_plot_handles(hhuvmat); 787 788 if strcmp(ListObject{IndexObj_1},ObjectName)% we are editing the object whose projection is viewed in the uvmat frame 788 789 ObjectData.HandlesDisplay=hhuvmat.axes3; 789 PlotHandles=get_plot_handles(hhuvmat);790 790 IndexObj=IndexObj_1; 791 791 elseif IndexObj_2<=numel(ListObject)&& strcmp(ListObject{IndexObj_2},ObjectName)% we are editing the object whose projection is viewed in view_field … … 793 793 if ~isempty(hview_field) 794 794 PlotHandles=guidata(hview_field); 795 % PlotHandles=get_plot_handles( hhview_field);796 795 ObjectData.HandlesDisplay=PlotHandles.axes3;%handle of axes3 in view_field 797 796 end … … 806 805 % set(hhuvmat.list_object_2,'Value',IndexObj) 807 806 end 808 ObjectName=get(handles.TITLE,'String');807 % ObjectName=get(handles.TITLE,'String'); 809 808 if length(ObjectName)<1 810 809 ObjectName=[num2str(IndexObj) '-' ObjectData.Style]; … … 820 819 set(hhuvmat.list_object_1,'String',ListObject) 821 820 set(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 list823 821 if testnew 824 822 set(hhuvmat.list_object_2,'Value',IndexObj) 825 823 end 826 % ObjectData.HandlesDisplay=[]; % new object plot by default827 % 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 plots832 % for ih=1:length(hdisplay)833 % PlotData=get(hdisplay(ih),'UserData');834 % if isfield(PlotData,'SubObject') & ishandle(PlotData.SubObject)835 % delete(PlotData.SubObject);836 % end837 % if isfield(PlotData,'DeformPoint') & ishandle(PlotData.DeformPoint)838 % delete(PlotData.DeformPoint);839 % end840 % if ~isequal(hdisplay(ih),0)841 % delete(hdisplay(ih));842 % end843 % end844 % if isfield(ObjectData,'plotaxes') && ishandle(ObjectData.plotaxes)845 % delete(ObjectData.plotaxes)%delete the axes for plotting the current projection result846 % end847 % end848 % end849 824 850 825 % update the object plot and projection field 851 826 UvData.Object{IndexObj}=update_obj(UvData,IndexObj,ObjectData,PlotHandles); 852 853 827 set(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)858 828 859 829 %set uvmat to object edit mode to allow further object update
Note: See TracChangeset
for help on using the changeset viewer.