Skip to content
Snippets Groups Projects
Commit d206e4a3 authored by Lemmer, Jan's avatar Lemmer, Jan
Browse files

Implements #92

parent bffd379d
No related branches found
No related tags found
2 merge requests!43Implements #73, cleans up example file,,!40Implements #92
Pipeline #597454 failed
...@@ -55,7 +55,7 @@ classdef userDLG ...@@ -55,7 +55,7 @@ classdef userDLG
obj.error(errorMessage) obj.error(errorMessage)
end end
end end
function [] = userMSG(obj,message) function [] = userMSG(obj,message)
%userMSG user message without priority %userMSG user message without priority
% MSG will only be displaye if ShowMessages is true % MSG will only be displaye if ShowMessages is true
...@@ -83,5 +83,21 @@ classdef userDLG ...@@ -83,5 +83,21 @@ classdef userDLG
end end
end end
end end
end
methods(Static)
function [status] = userQuestion(dialogMessage)
%userQuestion displays Y/N user input
m = '';
while ~ismember(m,{'Y','y','n','N'})
m = input([dialogMessage,', Y/N [Y]? '],'s');
end
if ismember(m,{'Y','y'})
status = true;
else
status = false;
end
end
end %static
end % class
...@@ -138,7 +138,12 @@ if isfolder(fullfile(storPath,folderNameV)) ...@@ -138,7 +138,12 @@ if isfolder(fullfile(storPath,folderNameV))
msg = ['Folder ',folderNameV, ' exists - Plot was already published ']; msg = ['Folder ',folderNameV, ' exists - Plot was already published '];
disp(msg); disp(msg);
dialogMsg = 'Do you want to overwrite the existing files'; dialogMsg = 'Do you want to overwrite the existing files';
overwriteDir = dlgObj.userDialog(dialogMsg, msg); overwriteDir = dlgObj.userQuestion(dialogMsg);
if ~overwriteDir % USR does not want to overwrite
warning('PlotID has finished without an export');
disp('rerun TagPlot if you need a new ID or consider overwriting.');
return; %terminate
end
end end
% create folder % create folder
if ~mkdir(fullfile(storPath,folderName)) if ~mkdir(fullfile(storPath,folderName))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment