Changeset 402 for trunk/src/view_field.m
- Timestamp:
- Apr 29, 2012, 11:29:24 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/view_field.m
r387 r402 102 102 write_plot_param(handles,PlotParamOut);% update the display of the plotting parameters 103 103 104 %------------------------------------------------------------------- 104 %------------------------------------------------------------------------ 105 105 % --- Outputs from this function are returned to the command menuline. 106 106 function varargout = view_field_OutputFcn(hObject, eventdata, handles) 107 %------------------------------------------------------------------------ 107 108 varargout{1} = handles.output;% the only output argument is the handle to the GUI figure 108 109 110 %------------------------------------------------------------------------ 111 %--- activated when closing the GUI view_field 112 function closefcn(gcbo,eventdata) 113 %------------------------------------------------------------------------ 114 huvmat=findobj(allchild(0),'Tag','uvmat');%find the current uvmat interface handle 115 if ~isempty(huvmat) 116 hhuvmat=guidata(huvmat); 117 set(hhuvmat.edit_object,'Value',0) 118 set(hhuvmat.edit_object,'BackgroundColor',[0.7 0.7 0.7])%put unactivated buttons to gree 119 % deselect the object in ListObject when view_field is closed 120 if isempty(findobj(allchild(0),'Tag','set_object')) 121 ObjIndex=get(hhuvmat.ListObject,'Value'); 122 ObjIndex=ObjIndex(1);%keep only the first object selected 123 set(hhuvmat.ListObject,'Value',ObjIndex) 124 % draw all object colors in blue (unselected) in uvmat 125 hother=[findobj(hhuvmat.axes3,'Tag','proj_object');findobj(hhuvmat.axes3,'Tag','DeformPoint')];%find all the proj object and deform point representations 126 for iobj=1:length(hother) 127 if isequal(get(hother(iobj),'Type'),'rectangle')||isequal(get(hother(iobj),'Type'),'patch') 128 set(hother(iobj),'EdgeColor','b') 129 if isequal(get(hother(iobj),'FaceColor'),'m') 130 set(hother(iobj),'FaceColor','b') 131 end 132 elseif isequal(get(hother(iobj),'Type'),'image') 133 Acolor=get(hother(iobj),'CData'); 134 Acolor(:,:,1)=zeros(size(Acolor,1),size(Acolor,2)); 135 set(hother(iobj),'CData',Acolor); 136 else 137 set(hother(iobj),'Color','b') 138 end 139 set(hother(iobj),'Selected','off') 140 end 141 end 142 end 109 143 110 144 %------------------------------------------------------------------- … … 733 767 colorbar 734 768 735 %------------------------------------------------------------------------ 736 function closefcn(hObject, eventdata, handles) 737 %------------------------------------------------------------------------ 738 huvmat=findobj(allchild(0),'Name','uvmat'); 739 if ~isempty(huvmat) 740 hhuvmat=guidata(huvmat); 741 % list_object_2=get(hhuvmat.list_object_2,'String'); 742 % set(hhuvmat.list_object_2,'Value',1)%select the last value ('...') 743 end 744 delete(hObject) 745 769
Note: See TracChangeset
for help on using the changeset viewer.