Skip to content

Commit 739c1af

Browse files
committed
Simplify ProjectShutdown.m
1 parent 7b06938 commit 739c1af

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

Utilities/ProjectShutdown.m

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,2 @@
1-
function ProjectShutdown
2-
% Reset module to original state that is expected when loading in a new
3-
% MATLAB version.
4-
proj = currentProject;
5-
if isMATLABReleaseOlderThan("R2023b")
6-
cd(proj.RootFolder)
7-
try
8-
if exist(fullfile("Utilities","OldVersions","MainMenuNew.mlx"),"file")
9-
movefile("MainMenu.mlx", fullfile("Utilities","OldVersions","MainMenuOld.mlx"))
10-
movefile(fullfile("Utilities","OldVersions","MainMenuNew.mlx"),fullfile(proj.RootFolder,"MainMenu.mlx"))
11-
end
12-
catch
13-
disp("Failed to move MainMenu.mlx.")
14-
end
15-
try
16-
if exist(fullfile("Utilities","OldVersions","READMENew.mlx"),"file")
17-
movefile("README.mlx", fullfile("Utilities","OldVersions","READMEOld.mlx"))
18-
movefile(fullfile("Utilities","OldVersions","READMENew.mlx"),fullfile(proj.RootFolder,"README.mlx"))
19-
end
20-
catch
21-
disp("Failed to move README.mlx.")
22-
end
23-
end
24-
end
1+
% Close the StartUp app if still open:
2+
delete(findall(groot,'Name','StartUp App'))

0 commit comments

Comments
 (0)