Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
'Yes to all' and 'No to all' should now work properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetane committed Mar 12, 2019
1 parent d0e3fd4 commit a6bed87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fgm.m
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,15 @@ function onSaveButton(~,~)
if ~strcmpi(dlgchoice, 'Cancel')
waitbar((wbInd-1)/(length(formats)*length(idSelectedFigures)),wb,wbText);
if isfile([fullFilePath,extension]) % if the file already exists
fileAlreadyExist = true;
if (length(idSelectedFigures) > 1 || length(formats) > 1) && (strcmpi(dlgchoice, 'Yes') || strcmpi(dlgchoice, 'No'))
dlgchoice = overwriteDialog([fullFilePath,extension]);
end
else
dlgchoice = 'Yes'; % save if the file does not exist
fileAlreadyExist = false; % save if the file does not exist
end

if (strcmpi(dlgchoice, 'Yes') || strcmpi(dlgchoice, 'Yes to all'))
if (strcmpi(dlgchoice, 'Yes') || strcmpi(dlgchoice, 'Yes to all')) || ~fileAlreadyExist
currentFig = figure(idSelectedFigures(i));
if strcmp(char(formats(j)),'pdf')
currentFig.PaperPositionMode = 'auto';
Expand Down

0 comments on commit a6bed87

Please sign in to comment.