Skip to content

Commit 572c04d

Browse files
committed
fix: close figures when using spm with mcr
force close invisble figures when using spm with mcr
1 parent 245acd4 commit 572c04d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

nipype/interfaces/spm/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,12 @@ def _make_matlab_command(self, contents, postscript=None):
499499
mscript += """
500500
spm_jobman(\'run\', jobs);\n
501501
"""
502+
if self.inputs.use_mcr:
503+
mscript += """
504+
if strcmp(name, 'SPM8') || strcmp(name, 'SPM12b'),
505+
close(\'all\', \'force\');
506+
end;
507+
"""
502508
if postscript is not None:
503509
mscript += postscript
504510
return mscript

0 commit comments

Comments
 (0)