Changeset 581 for trunk/src/browse_data.m
- Timestamp:
- Mar 12, 2013, 12:52:13 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/browse_data.m
r576 r581 22 22 function varargout = browse_data(varargin) 23 23 24 % Last Modified by GUIDE v2.5 15-Feb-2013 19:41:4824 % Last Modified by GUIDE v2.5 07-Mar-2013 18:55:00 25 25 26 26 % Begin initialization code - DO NOT EDIT … … 47 47 function browse_data_OpeningFcn(hObject, eventdata, handles, Campaign) 48 48 %------------------------------------------------------------------------ 49 % Choose default command line output for browse_data 49 50 %% Choose default command line output for browse_data 50 51 handles.output = 'Cancel'; 51 52 52 % Update handles structure53 %% Update handles structure 53 54 guidata(hObject, handles); 54 55 % Determine the position of the dialog - centered on the screen 55 set(hObject,'WindowButtonDownFcn',{'mouse_down'}) % allows mouse action with right button (zoom for uicontrol display) 56 57 %% Determine the position of the dialog - centered on the screen 56 58 FigPos=get(0,'DefaultFigurePosition'); 57 59 OldUnits = get(hObject, 'Units'); … … 95 97 set(handles.OK,'Visible','on') 96 98 set(handles.Cancel,'Visible','on') 97 set(handles. figure,'WindowStyle','modal')% Make% Make the GUI modal99 set(handles.browse_data,'WindowStyle','modal')% Make the GUI modal 98 100 set(hObject,'Visible','on') 99 101 drawnow 100 102 % UIWAIT makes GUI wait for user response (see UIRESUME) 101 uiwait(handles. figure);103 uiwait(handles.browse_data); 102 104 end 103 105 … … 108 110 % Get default command line output from handles structure 109 111 varargout{1} = handles.output; 110 delete(handles. figure)112 delete(handles.browse_data) 111 113 112 114 %------------------------------------------------------------------------ … … 312 314 set(handles.ListExperiments,'Value',1) 313 315 ListExperiments_Callback(hObject, eventdata, handles)%update the overview of the experiment directories 314 DataviewData=get(handles. figure,'UserData');316 DataviewData=get(handles.browse_data,'UserData'); 315 317 List=DataviewData.List; 316 318 Currentpath=get(handles.SourceDir,'String'); … … 580 582 set(handles.ListExperiments,'Value',1) 581 583 ListExperiments_Callback(hObject, eventdata, handles)%update the overview of the experiment directories 582 DataviewData=get(handles. figure,'UserData')584 DataviewData=get(handles.browse_data,'UserData') 583 585 List=DataviewData.List; 584 586 Currentpath=get(handles.SourceDir,'String'); … … 654 656 handles.output.Device=Device; 655 657 guidata(hObject, handles);% Update handles structure 656 uiresume(handles. figure);658 uiresume(handles.browse_data); 657 659 drawnow 658 660 return … … 676 678 677 679 %update all the selected xml files 678 DataviewData=get(handles. figure,'UserData');680 DataviewData=get(handles.browse_data,'UserData'); 679 681 % answer=msgbox_uvmat('INPUT_Y-N',[num2str(length(Value)) ' xml files for device ' ListDevices{1} ' will be refreshed with ' ... 680 682 % DataviewData.GeometryCalib.CalibrationType ' calibration data']) … … 771 773 % handles.output ='OK, Calibration replicated'; 772 774 % guidata(hObject, handles);% Update handles structure 773 % uiresume(handles. figure);775 % uiresume(handles.browse_data); 774 776 775 777 % --- Executes on button press in Cancel. … … 778 780 guidata(hObject, handles); % Update handles structure 779 781 % Use UIRESUME instead of delete because the OutputFcn needs 780 uiresume(handles. figure);781 782 % --- Executes when user attempts to close figure.783 function figure_CloseRequestFcn(hObject, eventdata, handles)784 if isequal(get(handles. figure, 'waitstatus'), 'waiting')782 uiresume(handles.browse_data); 783 784 % --- Executes when user attempts to close browse_data. 785 function browse_data_CloseRequestFcn(hObject, eventdata, handles) 786 if isequal(get(handles.browse_data, 'waitstatus'), 'waiting') 785 787 % The GUI is still in UIWAIT, us UIRESUME 786 uiresume(handles. figure);788 uiresume(handles.browse_data); 787 789 else 788 790 % The GUI is no longer waiting, just close it 789 delete(handles. figure);791 delete(handles.browse_data); 790 792 end 791 793 792 794 % --- Executes on key press over figure1 with no controls selected. 793 function figure_KeyPressFcn(hObject, eventdata, handles)795 function browse_data_KeyPressFcn(hObject, eventdata, handles) 794 796 % Check for "enter" or "escape" 795 797 if isequal(get(hObject,'CurrentKey'),'escape') … … 800 802 guidata(hObject, handles); 801 803 802 uiresume(handles. figure);804 uiresume(handles.browse_data); 803 805 end 804 806 if isequal(get(hObject,'CurrentKey'),'return') 805 uiresume(handles. figure);807 uiresume(handles.browse_data); 806 808 end
Note: See TracChangeset
for help on using the changeset viewer.