mirror of https://gitlab.com/pamhyr/pamhyr2
improve previous commit
parent
46738cec6b
commit
e9315d9be7
|
|
@ -134,9 +134,9 @@ class PlotH(PamhyrPlot):
|
||||||
y = profile.get_key("Q")
|
y = profile.get_key("Q")
|
||||||
|
|
||||||
if res_id == 2:
|
if res_id == 2:
|
||||||
label = "Δ " + self.label_discharge
|
label = "Δ " + self.label_discharge + f" {profile.name}"
|
||||||
else:
|
else:
|
||||||
label = self.label_discharge
|
label = self.label_discharge + f" {profile.name}"
|
||||||
|
|
||||||
if len(self._current_res_id) > 1:
|
if len(self._current_res_id) > 1:
|
||||||
if res_id != 2:
|
if res_id != 2:
|
||||||
|
|
|
||||||
|
|
@ -370,6 +370,10 @@ class ResultsWindow(PamhyrWindow):
|
||||||
self._button_last.clicked.connect(self._last)
|
self._button_last.clicked.connect(self._last)
|
||||||
self._timer.timeout.connect(self._update_slider)
|
self._timer.timeout.connect(self._update_slider)
|
||||||
|
|
||||||
|
# tabs
|
||||||
|
tab_widget = self.find(QTabWidget, f"tabWidget")
|
||||||
|
tab_widget.currentChanged.connect(self.tab_changed)
|
||||||
|
|
||||||
def update_table_selection_reach(self, ind):
|
def update_table_selection_reach(self, ind):
|
||||||
table = self.find(QTableView, f"tableView_reach")
|
table = self.find(QTableView, f"tableView_reach")
|
||||||
selectionModel = table.selectionModel()
|
selectionModel = table.selectionModel()
|
||||||
|
|
@ -440,7 +444,9 @@ class ResultsWindow(PamhyrWindow):
|
||||||
for plot in self._additional_plot:
|
for plot in self._additional_plot:
|
||||||
self._additional_plot[plot].set_profile(profile_id[0])
|
self._additional_plot[plot].set_profile(profile_id[0])
|
||||||
|
|
||||||
# self.update_table_selection_profile(profile_id[0])
|
tab_widget = self.find(QTabWidget, f"tabWidget")
|
||||||
|
if tab_widget.currentIndex() != 2:
|
||||||
|
self.update_table_selection_profile(profile_id[0])
|
||||||
|
|
||||||
if solver_id is not None:
|
if solver_id is not None:
|
||||||
self._current_results = solver_id
|
self._current_results = solver_id
|
||||||
|
|
@ -1148,3 +1154,11 @@ class ResultsWindow(PamhyrWindow):
|
||||||
|
|
||||||
def get_timestamps(self):
|
def get_timestamps(self):
|
||||||
self._timestamps = sorted(list(self._results[0].get("timestamps")))
|
self._timestamps = sorted(list(self._results[0].get("timestamps")))
|
||||||
|
|
||||||
|
def tab_changed(self, i):
|
||||||
|
if i != 2:
|
||||||
|
if len(self._get_current_profiles_list()) > 1:
|
||||||
|
# unselect all profiles but the first one
|
||||||
|
profile_id = self._get_current_profile()
|
||||||
|
self.update_table_selection_profile(profile_id)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue