Changeset 625 for trunk/src/set_object.m
- Timestamp:
- May 2, 2013, 7:51:42 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/set_object.m
r622 r625 153 153 end 154 154 end 155 if isfield(data,'Angle') && isequal(numel(data.Angle),3) 155 if ~isfield(data,'Angle') 156 data.Angle=[0 0 0]; 157 end 158 % if isfield(data,'Angle') && isequal(numel(data.Angle),3) 156 159 set(handles.num_Angle_1,'String',num2str(data.Angle(1))) 157 160 set(handles.num_Angle_2,'String',num2str(data.Angle(2))) 158 161 set(handles.num_Angle_3,'String',num2str(data.Angle(3))) 159 end 160 end 161 % if enable_plot 162 % set(handles.PLOT,'enable','on') 163 % else 164 % enable the PLOT (REFRESH) button by default 165 %defaul settings 166 set(get(handles.set_object,'children'),'enable','on') 167 set(handles.PLOT,'enable','off') 168 % end 169 % huvmat=findobj(allchild(0),'tag','uvmat'); 170 % UvData=get(huvmat,'UserData'); 171 % pos_uvmat=get(huvmat,'Position'); 172 % %position the set_object GUI with respect to uvmat 173 % if isfield(UvData,'SetObjectOrigin') 174 % pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2); 175 % pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4); 176 % set(hObject,'Position',pos_set_object) 177 % end 162 % end 163 end 164 set(get(handles.set_object,'children'),'enable','off') 165 set(handles.SAVE,'enable','on') 166 % set(handles.PLOT,'enable','off') 167 178 168 179 169 %------------------------------------------------------------------------ … … 195 185 set(hhuvmat.ViewObject,'value',0)% 196 186 set(hhuvmat.edit_object,'Value',0)% desactivate the edit option 197 set(hhuvmat.edit_object,'BackgroundColor',[0.7 0.7 0.7])%put unactivated buttons to gree187 % set(hhuvmat.edit_object,'BackgroundColor',[0.7 0.7 0.7])%put unactivated buttons to gree 198 188 % deselect the object in ListObject when view_field is closed 199 189 if isempty(findobj(allchild(0),'Tag','view_field')) … … 450 440 hhuvmat=guidata(huvmat);%handles of the objects children of the GUI uvmat 451 441 ListObject=get(hhuvmat.ListObject,'String');% list of objects displayed in uvmat 452 IndexObj=get(hhuvmat.ListObject,'Value');% index of the selected object for display in uvmat 442 443 if isequal(get(hhuvmat.edit_object,'Value'),0) %we append a new object 444 ListObject=[ListObject;{''}]; 445 IndexObj=length(ListObject); 446 set(hhuvmat.ListObject,'String',ListObject) 447 set(hhuvmat.ListObject,'Value',IndexObj) 448 UvData.ProjObject{IndexObj}=[]; %create a new empty object 449 UvData.ProjObject{IndexObj}.DisplayHandle.uvmat=hhuvmat.PlotAxes; % axes for plot_object 450 UvData.ProjObject{IndexObj}.DisplayHandle.view_field=[]; %no plot handle before plot_field operation 451 else 452 % if ~strcmp(ListObject{end},'') 453 % ListObject=[ListObject;{''}]; %append a blank to the list (if nort already done) to indicate the creation of a new object 454 % set(handles.ListObject,'String',ListObject) 455 % end 456 % IndexObj=length(ListObject); 457 % set(handles.uvmat,'UserData',UvData) 458 IndexObj=get(hhuvmat.ListObject,'Value');% index of the selected object for display in uvmat 459 end 460 453 461 %set or modify(edit mode) the nameof the currently selected object 454 462 detectname=1; … … 474 482 ListObject{IndexObj}=ObjectName; 475 483 set(hhuvmat.ListObject,'String',ListObject);%complement the object list 484 set(hhuvmat.ListObject_1,'String',ListObject);%complement the object list 476 485 set(hhuvmat.ViewObject,'Value',1)% indicate that the currently selected objected is viewed on set_object 477 486 check_handle=isfield(UvData.ProjObject{IndexObj},'DisplayHandle') && isfield(UvData.ProjObject{IndexObj}.DisplayHandle,'uvmat')... … … 572 581 set(hhuvmat.MenuEditObject,'enable','on') 573 582 set(hhuvmat.edit_object,'Value',1) % set uvmat to object edit mode to allow further object update 574 set(hhuvmat.edit_object,'BackgroundColor',[1 1 0]);% paint the edit text in yellow583 %set(hhuvmat.edit_object,'BackgroundColor',[1 1 0]);% paint the edit text in yellow 575 584 set(hhuvmat.ViewField,'Value',1) 576 585 % set(handles.PLOT,'enable','on')
Note: See TracChangeset
for help on using the changeset viewer.