mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
enable multiple profiles in discharge visualization window
This commit is contained in:
1 parent
e576bb15f1
commit
46738cec6b
3 files changed
+45
-32
No files matched your search
+21
-10
@@ -126,7 +126,7 @@ class ResultsWindow(PamhyrWindow):
|
||||
return
|
||||
|
||||
self.update(reach_id=0,
|
||||
profile_id=0)
|
||||
profile_id=[0])
|
||||
|
||||
self.update_table_selection_solver(0)
|
||||
|
||||
@@ -269,7 +269,7 @@ class ResultsWindow(PamhyrWindow):
|
||||
canvas=self.canvas_4,
|
||||
results=self._results,
|
||||
reach_id=0,
|
||||
profile_id=0,
|
||||
profile_id=[0],
|
||||
res_id=self._current_results,
|
||||
trad=self._trad,
|
||||
toolbar=self.toolbar_4,
|
||||
@@ -432,15 +432,15 @@ class ResultsWindow(PamhyrWindow):
|
||||
self.update_table_selection_profile(0)
|
||||
|
||||
if profile_id is not None:
|
||||
self.plot_xy.set_profile(profile_id)
|
||||
self.plot_ac.set_profile(profile_id)
|
||||
self.plot_rkc.set_profile(profile_id)
|
||||
self.plot_xy.set_profile(profile_id[0])
|
||||
self.plot_ac.set_profile(profile_id[0])
|
||||
self.plot_rkc.set_profile(profile_id[0])
|
||||
self.plot_h.set_profile(profile_id)
|
||||
|
||||
for plot in self._additional_plot:
|
||||
self._additional_plot[plot].set_profile(profile_id)
|
||||
self._additional_plot[plot].set_profile(profile_id[0])
|
||||
|
||||
self.update_table_selection_profile(profile_id)
|
||||
# self.update_table_selection_profile(profile_id[0])
|
||||
|
||||
if solver_id is not None:
|
||||
self._current_results = solver_id
|
||||
@@ -481,6 +481,14 @@ class ResultsWindow(PamhyrWindow):
|
||||
|
||||
return indexes[0].row()
|
||||
|
||||
def _get_current_profiles_list(self):
|
||||
table = self.find(QTableView, f"tableView_profile")
|
||||
indexes = table.selectedIndexes()
|
||||
if len(indexes) == 0:
|
||||
return 0
|
||||
|
||||
return [i.row() for i in indexes]
|
||||
|
||||
def _get_current_timestamp(self):
|
||||
return self._timestamps[
|
||||
self._slider_time.value()
|
||||
@@ -496,12 +504,11 @@ class ResultsWindow(PamhyrWindow):
|
||||
|
||||
def _set_current_profile(self):
|
||||
table = self.find(QTableView, f"tableView_profile")
|
||||
indexes = table.selectedIndexes()
|
||||
indexes = table.selectionModel().selectedRows()
|
||||
if len(indexes) == 0:
|
||||
return
|
||||
|
||||
ind = indexes[0].row()
|
||||
self.update(profile_id=ind)
|
||||
self.update(profile_id=[i.row() for i in indexes])
|
||||
|
||||
def _set_current_profile_raw_data(self):
|
||||
return
|
||||
@@ -545,6 +552,8 @@ class ResultsWindow(PamhyrWindow):
|
||||
self._reload_slider()
|
||||
|
||||
def _add_custom_plot(self):
|
||||
profile_id = self._get_current_profile()
|
||||
self.update_table_selection_profile(profile_id)
|
||||
dlg = CustomPlotValuesSelectionDialog(parent=self)
|
||||
if dlg.exec():
|
||||
x, y, envelop = dlg.value
|
||||
@@ -665,6 +674,8 @@ class ResultsWindow(PamhyrWindow):
|
||||
self._button_play.setIcon(self._icon_start)
|
||||
|
||||
def _export(self):
|
||||
profile_id = self._get_current_profile()
|
||||
self.update_table_selection_profile(profile_id)
|
||||
|
||||
dlg = CustomExportDialog(parent=self)
|
||||
if dlg.exec():
|
||||
|
||||
Reference in new issue
Block a user