Skip to content

Commit

Permalink
Small tweak on lead main figure open results/patientfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
andreashorn committed Feb 26, 2016
1 parent 5402307 commit 94687ca
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
Binary file modified lead.fig
Binary file not shown.
28 changes: 27 additions & 1 deletion lead.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

% Edit the above text to modify the response to help lead

% Last Modified by GUIDE v2.5 26-Jan-2016 17:44:44
% Last Modified by GUIDE v2.5 26-Feb-2016 10:54:25

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
Expand Down Expand Up @@ -1633,6 +1633,8 @@ function openresultdir_Callback(hObject, eventdata, handles)
system(['explorer ', outfolder]);
end

cd(outfolder);

% --- Executes on button press in viewmanual.
function viewmanual_Callback(hObject, eventdata, handles)
% hObject handle to viewmanual (see GCBO)
Expand Down Expand Up @@ -1690,3 +1692,27 @@ function vizspacepopup_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in openpatientdir.
function openpatientdir_Callback(hObject, eventdata, handles)
% hObject handle to openpatientdir (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

outfolder=get(handles.patdir_choosebox,'String');

if strcmp(outfolder,'No Patient Selected')
msgbox('Please set the working directory first!', 'Error','error');
return;
end

if ismac
system(['open ', outfolder]);
elseif isunix
system(['xdg-open ', outfolder]);
elseif ispc
system(['explorer ', outfolder]);
end

cd(outfolder);

0 comments on commit 94687ca

Please sign in to comment.