diff +mpm/clear.m @ 21:02c290e2018c

Refactor ui functions to use the MPM class. Not tested
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 17 Sep 2018 15:49:39 +0200
parents ce34182c274e
children
line wrap: on
line diff
--- a/+mpm/clear.m	Mon Sep 17 15:46:16 2018 +0200
+++ b/+mpm/clear.m	Mon Sep 17 15:49:39 2018 +0200
@@ -1,13 +1,5 @@
 % Remove all loaded subpaths from the matlab path
 function clear()
-    state = mpm.load_state();
-
-    subpaths = state.added_paths.keys();
-
-    for i = 1:length(subpaths)
-        rmpath(subpaths{i});
-        state.added_paths.remove(subpaths{i});
-    end
-
-    mpm.save_state(state);
+    m = mpm.MatlabPathManager();
+    m.clear();
 end