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
|
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:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue