diff --git a/src/View/MainWindow.py b/src/View/MainWindow.py index 4a0b4476..00db0ce4 100644 --- a/src/View/MainWindow.py +++ b/src/View/MainWindow.py @@ -1697,6 +1697,11 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit): return workdir + def is_solver_workdir_exists(self, solver, scenario=None): + return os.path.exists( + self._solver_workdir(solver, scenario) + ) + def open_last_results(self): if self._last_solver is None: return @@ -1707,9 +1712,14 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit): self, self._trad['Solver'], self._trad['Solver'] + ":", list( - map(lambda s: s.name, - filter(lambda s: s._type in solver_type, - self.conf.solvers)) + map( + lambda s: s.name, + filter( + lambda s: (self.is_solver_workdir_exists(s) + or s._type in solver_type), + self.conf.solvers + ) + ) ) ) if not ok: