mirror of https://gitlab.com/pamhyr/pamhyr2
Results: Select solver for last results also if the results path exists.
parent
b04e367e72
commit
291b97ac9b
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue