mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Results: Select solver for last results also if the results path exists.
This commit is contained in:
1 parent
b04e367e72
commit
291b97ac9b
1 file changed
+13
-3
+13
-3
@@ -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:
|
||||||
|
|||||||
Reference in new issue
Block a user