Results: Select solver for last results also if the results path exists.

scenario-dev-pa
Pierre-Antoine 2025-11-04 16:35:37 +01:00
parent b04e367e72
commit 291b97ac9b
1 changed files with 13 additions and 3 deletions

View File

@ -1697,6 +1697,11 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
return workdir 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): def open_last_results(self):
if self._last_solver is None: if self._last_solver is None:
return return
@ -1707,9 +1712,14 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
self, self._trad['Solver'], self, self._trad['Solver'],
self._trad['Solver'] + ":", self._trad['Solver'] + ":",
list( list(
map(lambda s: s.name, map(
filter(lambda s: s._type in solver_type, lambda s: s.name,
self.conf.solvers)) filter(
lambda s: (self.is_solver_workdir_exists(s)
or s._type in solver_type),
self.conf.solvers
)
)
) )
) )
if not ok: if not ok: