mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
InitialConditionsAdisTS: split correctly reach and InitialConditionsAdisTS + display only enabled reach in tab
This commit is contained in:
1 parent
6175e8a03e
commit
5e95c286a9
6 files changed
+117
-25
No files matched your search
@@ -152,14 +152,14 @@ class InitialConditionsAdisTSWindow(PamhyrWindow):
|
||||
self._delegate_reach = ComboBoxDelegate(
|
||||
trad=self._trad,
|
||||
data=self._study.river,
|
||||
ic_spec_lst=self._data[0]._data,
|
||||
ic_spec_lst=self._data[0],
|
||||
parent=self,
|
||||
mode="reaches"
|
||||
)
|
||||
self._delegate_rk = ComboBoxDelegate(
|
||||
trad=self._trad,
|
||||
data=self._study.river,
|
||||
ic_spec_lst=self._data[0]._data,
|
||||
ic_spec_lst=self._data[0],
|
||||
parent=self,
|
||||
mode="rk"
|
||||
)
|
||||
@@ -308,7 +308,10 @@ class InitialConditionsAdisTSWindow(PamhyrWindow):
|
||||
|
||||
def add(self):
|
||||
rows = self.index_selected_rows()
|
||||
if len(self._data[0]._data) == 0 or len(rows) == 0:
|
||||
visible = self._data[0].get_specs_for_enabled_reaches(
|
||||
self._study.river.edges()
|
||||
)
|
||||
if len(visible) == 0 or len(rows) == 0:
|
||||
self._table_spec.add(0)
|
||||
else:
|
||||
self._table_spec.add(rows[0])
|
||||
|
||||
Reference in new issue
Block a user