mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
MainWindow: Add message box at results opening error.
This commit is contained in:
1 parent
44a8be6be3
commit
c63c776989
2 files changed
+30
No files matched your search
@@ -1569,10 +1569,12 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
|
||||
# No results available
|
||||
if results is None:
|
||||
self.msg_open_results_no_results()
|
||||
return
|
||||
|
||||
# results does not have values, for example if geometry missmatch
|
||||
if not results.is_valid:
|
||||
self.msg_open_results_invalid_results()
|
||||
return
|
||||
|
||||
if results.get('study_revision') != self._study.status.version:
|
||||
@@ -1598,6 +1600,20 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
)
|
||||
res.show()
|
||||
|
||||
def msg_open_results_no_results(self):
|
||||
self.message_box(
|
||||
window_title=self._trad["Warning"],
|
||||
text=self._trad["mb_open_results_title"],
|
||||
informative_text=self._trad["mb_open_results_no_results_msg"]
|
||||
)
|
||||
|
||||
def msg_open_results_invalid_results(self):
|
||||
self.message_box(
|
||||
window_title=self._trad["Error"],
|
||||
text=self._trad["mb_open_results_title"],
|
||||
informative_text=self._trad["mb_open_results_invalid_results_msg"]
|
||||
)
|
||||
|
||||
def open_solver_results_adists(self, solver, results=None):
|
||||
def reading_fn():
|
||||
self._tmp_results = results
|
||||
|
||||
Reference in new issue
Block a user