mirror of https://gitlab.com/pamhyr/pamhyr2
debug
parent
41d1fb9d59
commit
1289967abb
|
|
@ -1437,8 +1437,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
data=[
|
||||
self._study,
|
||||
None, # No config
|
||||
results
|
||||
]
|
||||
results]
|
||||
):
|
||||
return
|
||||
|
||||
|
|
@ -1493,7 +1492,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
self._study,
|
||||
None, # No config
|
||||
solver,
|
||||
results
|
||||
results,
|
||||
self
|
||||
]
|
||||
):
|
||||
return
|
||||
|
|
@ -1583,17 +1583,17 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
ResultsWindow,
|
||||
data=[
|
||||
self._study,
|
||||
None, # No config
|
||||
results[0]
|
||||
]
|
||||
None] + # No config
|
||||
results
|
||||
):
|
||||
w = self.get_sub_window(
|
||||
ResultsWindow,
|
||||
data=[
|
||||
self._study,
|
||||
None, # No config
|
||||
results[0]
|
||||
])
|
||||
#w = self.get_sub_window(
|
||||
#ResultsWindow,
|
||||
#data=[
|
||||
#self._study,
|
||||
#None, # No config
|
||||
#results,
|
||||
#parent=self
|
||||
#])
|
||||
#w.add_result(result[1], run.solver2)
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ _translate = QCoreApplication.translate
|
|||
class TableModel(PamhyrTableModel):
|
||||
def _setup_lst(self):
|
||||
_river = self._data.river
|
||||
self._timestamp = min(list(self._data.get("timestamps")))
|
||||
if self._opt_data == "reach":
|
||||
self._lst = _river.reachs
|
||||
elif self._opt_data == "profile":
|
||||
|
|
@ -57,7 +58,6 @@ class TableModel(PamhyrTableModel):
|
|||
self._lst = tmp_list
|
||||
|
||||
def __init__(self, type_pol, **kwargs):
|
||||
self._timestamp = 0.0
|
||||
self._type_pol = type_pol
|
||||
super(TableModel, self).__init__(**kwargs)
|
||||
|
||||
|
|
|
|||
|
|
@ -89,14 +89,13 @@ class ResultsWindow(PamhyrWindow):
|
|||
self._solvers = [r._solver for r in results]
|
||||
self._results = results
|
||||
self._current_results = 0
|
||||
print("solver: " + results[0]._solver.name)
|
||||
|
||||
if trad is None:
|
||||
trad = ResultsTranslate()
|
||||
name = (
|
||||
trad[self._pamhyr_name] + " - "
|
||||
+ study.name + " - "
|
||||
+ self._solvers[self._current_results].name
|
||||
+ " - ".join([s.name for s in self._solvers])
|
||||
)
|
||||
|
||||
super(ResultsWindow, self).__init__(
|
||||
|
|
@ -107,7 +106,8 @@ class ResultsWindow(PamhyrWindow):
|
|||
parent=parent
|
||||
)
|
||||
|
||||
self._hash_data.append(self._results)
|
||||
for r in results:
|
||||
self._hash_data.append(r)
|
||||
|
||||
self._additional_plot = {}
|
||||
|
||||
|
|
|
|||
|
|
@ -379,9 +379,13 @@ class ResultsWindowAdisTS(PamhyrWindow):
|
|||
else:
|
||||
pollutant = self._results.pollutants_list[indexes[0].row()]
|
||||
|
||||
return (f"Reach: {reach.name} | " +
|
||||
f"Profile: {pname} | " +
|
||||
f"Pollutant: {pollutant}")
|
||||
#return (f"Reach: {reach.name} | " +
|
||||
#f"Profile: {pname} | " +
|
||||
#f"Pollutant: {pollutant}")
|
||||
return (f"{self._trad['reach']}: {reach.name} | " +
|
||||
f"{self._trad['cross_section']}: {pname} | " +
|
||||
f"Pollutant: {pollutant} | " +
|
||||
f"{self._trad['unit_time_s']} : {fts} ({ts} sec)")
|
||||
|
||||
def setup_statusbar(self):
|
||||
txt = self._compute_status_label()
|
||||
|
|
|
|||
|
|
@ -131,6 +131,12 @@ class ResultsTranslate(MainTranslate):
|
|||
"max_depth": self._dict["unit_max_depth"],
|
||||
}
|
||||
|
||||
self._sub_dict["values_y_pol"] = {
|
||||
"unit_C": self._dict["unit_concentration"],
|
||||
"unit_M": self._dict["unit_mass"],
|
||||
"unit_thickness": self._dict["unit_thickness"],
|
||||
}
|
||||
|
||||
class CompareResultsTranslate(ResultsTranslate):
|
||||
def __init__(self):
|
||||
super(CompareResultsTranslate, self).__init__()
|
||||
|
|
@ -162,8 +168,3 @@ class CompareResultsTranslate(ResultsTranslate):
|
|||
"froude": u"Δ "+self._dict["unit_froude"],
|
||||
"wet_area": u"Δ "+self._dict["unit_wet_area"],
|
||||
}
|
||||
self._sub_dict["values_y_pol"] = {
|
||||
"unit_C": self._dict["unit_concentration"],
|
||||
"unit_M": self._dict["unit_mass"],
|
||||
"unit_thickness": self._dict["unit_thickness"],
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue