Skip to content

Commit 82db2c4

Browse files
committed
Update to resolve conflicts
1 parent 1bbde09 commit 82db2c4

File tree

4 files changed

+9
-24
lines changed

4 files changed

+9
-24
lines changed

GannetLoad.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
error('MATLAB:minrhs', 'Not enough input arguments.');
1919
end
2020

21-
MRS_struct.version.Gannet = '3.3.2';
21+
MRS_struct.version.Gannet = '3.3.1';
2222
MRS_struct.version.load = '230728';
2323
VersionCheck(0, MRS_struct.version.Gannet);
2424
ToolboxCheck;

VersionCheck.m

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
if nargin < 2
1616
loadFile = which('GannetLoad');
1717
if isempty(loadFile)
18-
error('Cannot find GannetLoad.m; please ensure that your Gannet directory is included in your MATLAB search path.')
18+
error('Cannot find GannetLoad; please ensure that your Gannet folder is included in the MATLAB search path.')
1919
end
2020
fileID = fopen(loadFile, 'rt');
2121
if fileID == -1
@@ -34,11 +34,12 @@
3434

3535
newVersionAvailable = 0;
3636
if nargin < 2 || isempty(lastCheckTime) || (datetime('now') - lastCheckTime) > days(1)
37+
3738
url = 'https://raw.githubusercontent.com/markmikkelsen/Gannet/main/GannetLoad.m';
3839
str = readURL(url);
3940
if isempty(str)
4041
if ~silent
41-
warning('Unable to check for Gannet updates; this may happen if your system has limited internet access.');
42+
warning('Unable to check for Gannet updates; this may happen if your system has limited internet access');
4243
end
4344
newVersionAvailable = 0;
4445
else
@@ -51,7 +52,7 @@
5152
'***********************************************************************************************\n', ...
5253
'A newer version of Gannet (%s) is available. You are currently using version %s.\n' ...
5354
'You can download the newer version from GitHub or run UpdateGannet to install it directly.\n', ...
54-
'***********************************************************************************************\n'];
55+
'***********************************************************************************************\n\n'];
5556
msg = hyperlink('https://github.com/markmikkelsen/Gannet', 'GitHub', msg);
5657
msg = hyperlink('matlab:UpdateGannet', 'UpdateGannet', msg);
5758
if ~silent
@@ -87,8 +88,8 @@
8788
if ~isempty(strfind(err.message,'404'))
8889
rethrow(err);
8990
else
90-
warning(err.message);
91-
str = '';
91+
warning(err.message);
92+
str = '';
9293
end
9394
end
9495
end

export_fig/append_pdfs.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ function append_pdfs(varargin)
4242
% 29/03/20: Accept a cell-array of input files (issue #299); accept both "strings", 'chars'
4343
% 25/01/22: Improved handling of missing input files & folder with non-ASCII chars (issue #349)
4444
% 07/06/23: Fixed (hopefully) unterminated quote run-time error (issues #367, #378); fixed handling of pathnames with non-ASCII chars (issue #349); display ghostscript command upon run-time invocation error
45-
% 06/07/23: Another attempt to fix issue #378 (remove unnecessary quotes from ghostscript cmdfile)
4645
%}
4746

4847
if nargin < 2, return; end % sanity check
@@ -155,7 +154,6 @@ function prepareCmdFile(cmdfile, output, varargin)
155154
str = ['-q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress ' ...
156155
'-sOutputFile="' output '" -f ' sprintf('"%s" ',varargin{:})];
157156
str = regexprep(str, ' "?" ',' '); % remove empty strings (issues #367,#378)
158-
str = regexprep(str, '"([^ ]*)"', '$1'); % remove unnecessary quotes
159157
str = strtrim(str); % trim extra spaces
160158

161159
fh = fopen(cmdfile, 'w');

export_fig/export_fig.m

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@
386386
% 23/04/23: (3.37) Fixed run-time error with old Matlab releases (issue #374); -notify console message about exported image now displays black (STDOUT) not red (STDERR)
387387
% 15/05/23: (3.38) Fixed endless recursion when using export_fig in Live Scripts (issue #375); don't warn about exportgraphics/copygraphics alternatives in deployed mode
388388
% 30/05/23: (3.39) Fixed exported bgcolor of uifigures or figures in Live Scripts (issue #377)
389-
% 06/07/23: (3.40) For Tiff compression, use AdobeDeflate codec (if available) instead of Deflate (issue #379)
390389
%}
391390

392391
if nargout
@@ -424,7 +423,7 @@
424423
[fig, options] = parse_args(nargout, fig, argNames, varargin{:});
425424

426425
% Check for newer version and exportgraphics/copygraphics compatibility
427-
currentVersion = 3.40;
426+
currentVersion = 3.39;
428427
if options.version % export_fig's version requested - return it and bail out
429428
imageData = currentVersion;
430429
return
@@ -660,8 +659,6 @@
660659

661660
% Main processing
662661
try
663-
oldWarn = warning;
664-
665662
% Export bitmap formats first
666663
if isbitmap(options)
667664
if abs(options.bb_padding) > 1
@@ -921,13 +918,7 @@
921918
t.setTag('ImageLength', size(img,1));
922919
t.setTag('ImageWidth', size(img,2));
923920
t.setTag('Photometric', Tiff.Photometric.RGB);
924-
try %issue #379 use Tiff.Compression.AdobeDeflate by default
925-
compressionMode = Tiff.Compression.AdobeDeflate;
926-
catch
927-
warning off imageio:tiffmexutils:libtiffWarning %issue #379
928-
compressionMode = Tiff.Compression.Deflate;
929-
end
930-
t.setTag('Compression', compressionMode);
921+
t.setTag('Compression', Tiff.Compression.Deflate);
931922
t.setTag('PlanarConfiguration', Tiff.PlanarConfiguration.Chunky);
932923
t.setTag('ExtraSamples', Tiff.ExtraSamples.AssociatedAlpha);
933924
t.setTag('ResolutionUnit', Tiff.ResolutionUnit.Inch);
@@ -1537,12 +1528,7 @@
15371528
if ~nargout
15381529
clear imageData alpha
15391530
end
1540-
1541-
% Revert warnings state
1542-
warning(oldWarn);
15431531
catch err
1544-
% Revert warnings state
1545-
warning(oldWarn);
15461532
% Revert figure properties in case they were changed
15471533
try set(fig,'Units',oldFigUnits, 'Position',pos, 'Color',tcol_orig); catch, end
15481534
% Display possible workarounds before the error message

0 commit comments

Comments
 (0)