Changeset 912 for trunk/src/set_object.m
- Timestamp:
- Jun 16, 2015, 8:15:10 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/set_object.m
r911 r912 38 38 function varargout = set_object(varargin) 39 39 40 % Last Modified by GUIDE v2.5 1 5-Jun-2015 19:51:1540 % Last Modified by GUIDE v2.5 16-Jun-2015 00:33:59 41 41 42 42 % Begin initialization code - DO NOT REFRESH … … 307 307 set(handles.num_DY,'Visible','off') 308 308 set(handles.num_DZ,'Visible','off') 309 set(handles.num_RangeInterp,'Visible','off') 309 310 310 311 switch ObjectStyle … … 322 323 set(handles.num_DX,'Visible','on') 323 324 set(handles.num_DX,'TooltipString','num_DX: mesh for the interpolated field along the line') 325 set(handles.num_RangeInterp,'Visible','on') 324 326 end 325 327 case {'rectangle','ellipse'} … … 341 343 set(handles.num_DX,'Visible','on') 342 344 set(handles.num_DY,'Visible','on') 345 set(handles.num_RangeInterp,'Visible','on') 343 346 else 344 347 set(handles.num_DX,'Visible','off') 345 348 set(handles.num_DY,'Visible','off') 346 349 end 347 if isequal(ProjMode,'interp_lin')348 set(handles.num_DZ,'Visible','on')349 end350 % if isequal(ProjMode,'interp_lin') 351 % set(handles.num_DZ,'Visible','on') 352 % end 350 353 case {'volume'} 351 354 set(handles.num_RangeX_1,'Visible','on') … … 372 375 % set default values read in the plot of uvmat to initiate the mesh 373 376 if isequal(ProjMode,'interp_lin')|| isequal(ProjMode,'interp_tps') 377 huvmat=findobj('Tag','uvmat');%find the current uvmat interface handle 378 UvData=get(huvmat,'UserData');%Data associated to the current uvmat interface 374 379 if isempty(str2num(get(handles.num_DX,'String')))||isempty(str2num(get(handles.num_DY,'String'))); 375 huvmat=findobj('Tag','uvmat');%find the current uvmat interface handle 376 UvData=get(huvmat,'UserData');%Data associated to the current uvmat interface 377 Field=UvData.Field; 380 % Field=UvData.Field; 378 381 if isfield(UvData.Field,'CoordMesh')&&~isempty(UvData.Field.CoordMesh) 379 382 set(handles.num_DX,'String',num2str(UvData.Field.CoordMesh)) … … 387 390 set(handles.CoordUnit,'String',Field.CoordUnit) 388 391 end 392 end 393 if isempty(str2num(get(handles.num_RangeInterp,'String'))) 394 set(handles.num_RangeInterp,'String',num2str(3*UvData.Field.CoordMesh))% default interpolationlength= 3 meshes 389 395 end 390 396 end … … 416 422 huvmat=findobj('Tag','uvmat');%find the current uvmat interface handle 417 423 UvData=get(huvmat,'UserData');%Data associated to the current uvmat interface 418 if isfield(UvData,'X') & isfield(UvData,'Y')& isfield(UvData,'Z')424 if isfield(UvData,'X') && isfield(UvData,'Y') && isfield(UvData,'Z') 419 425 Z=norm_plane(1)*(UvData.X)+norm_plane(2)*(UvData.Y)+norm_plane(3)*(UvData.Z); 420 426 set(handles.z_slider,'Min',min(Z)) … … 691 697 t=struct2xml(Object); 692 698 t=set(t,1,'name','ProjObject'); 693 save(t,FullName) 694 msgbox_uvmat('CONFIRMATION',[FullName ' saved']) 699 try 700 save(t,FullName) 701 msgbox_uvmat('CONFIRMATION',[FullName ' saved']) 702 catch ME 703 msgbox_uvmat('ERROR',ME.message) 704 end 695 705 end 696 706 end … … 801 811 802 812 function num_RangeInterp_Callback(hObject, eventdata, handles) 803 % hObject handle to num_RangeInterp (see GCBO)804 % eventdata reserved - to be defined in a future version of MATLAB805 % handles structure with handles and user data (see GUIDATA)806 807 % Hints: get(hObject,'String') returns contents of num_RangeInterp as text808 % str2double(get(hObject,'String')) returns contents of num_RangeInterp as a double809 810 811 % --- Executes during object creation, after setting all properties.812 function num_RangeInterp_CreateFcn(hObject, eventdata, handles)813 % hObject handle to num_RangeInterp (see GCBO)814 % eventdata reserved - to be defined in a future version of MATLAB815 % handles empty - handles not created until after all CreateFcns called816 817 % Hint: edit controls usually have a white background on Windows.818 % See ISPC and COMPUTER.819 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))820 set(hObject,'BackgroundColor','white');821 end
Note: See TracChangeset
for help on using the changeset viewer.