mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
debug remove sediment
This commit is contained in:
1 parent
02ccfa9ed7
commit
c53e82a423
5 files changed
+31
-20
No files matched your search
@@ -146,8 +146,7 @@ class TableModel(PamhyrTableModel):
|
||||
n = data[row].node
|
||||
if n is None:
|
||||
return self._trad["not_associated"]
|
||||
tmp = next(filter(lambda x: x.id == n, self._data._nodes),
|
||||
None)
|
||||
tmp = next(filter(lambda x: x.id == n, self._data._nodes), None)
|
||||
if tmp is not None:
|
||||
return tmp.name
|
||||
else:
|
||||
@@ -156,7 +155,14 @@ class TableModel(PamhyrTableModel):
|
||||
n = data[row].pollutant
|
||||
if n is None or n == "not_associated" or n == "":
|
||||
return self._trad["not_associated"]
|
||||
return self._data._Pollutants.Pollutants_List[n].name
|
||||
tmp = next(filter(lambda x: x.id == n,
|
||||
self._data._Pollutants.Pollutants_List
|
||||
),
|
||||
None)
|
||||
if tmp is not None:
|
||||
return tmp.name
|
||||
else:
|
||||
return self._trad["not_associated"]
|
||||
|
||||
return QVariant()
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class ComboBoxDelegate(QItemDelegate):
|
||||
reach_id = self._ic_spec_lst[index.row()].reach
|
||||
|
||||
reach = next(filter(lambda edge: edge.id == reach_id,
|
||||
self._data.edges()))
|
||||
self._data.edges()), None)
|
||||
|
||||
if reach_id is not None:
|
||||
val = list(
|
||||
|
||||
@@ -101,7 +101,9 @@ class DelCommand(QUndoCommand):
|
||||
|
||||
for row in rows:
|
||||
self._pollutants.append((row, self._pollutants_lst.get(row)))
|
||||
self._inc_pollutants.append((row, self._inc_pollutants_lst))
|
||||
self._inc_pollutants.append(
|
||||
(row, self._inc_pollutants_lst.get(row))
|
||||
)
|
||||
self._pollutants.sort()
|
||||
self._inc_pollutants.sort()
|
||||
|
||||
|
||||
@@ -105,7 +105,6 @@ class PollutantsWindow(PamhyrWindow):
|
||||
|
||||
def setup_connections(self):
|
||||
self.find(QAction, "action_add").triggered.connect(self.add)
|
||||
self.find(QAction, "action_delete").setEnabled(False)
|
||||
self.find(QAction, "action_delete").triggered.connect(self.delete)
|
||||
self.find(QAction, "action_edit").triggered.connect(self.edit)
|
||||
self.find(QAction, "action_initial_conditions"
|
||||
@@ -205,8 +204,9 @@ class PollutantsWindow(PamhyrWindow):
|
||||
for row in rows:
|
||||
pollutant_id = self._pollutants_lst.get(row).id
|
||||
|
||||
iclist = self._study.river.ic_adists.Initial_Conditions_List
|
||||
ics_adists = next(filter(lambda x: x.pollutant == pollutant_id,
|
||||
self._study.river.ic_adists.lst))
|
||||
iclist))
|
||||
|
||||
if self.sub_window_exists(
|
||||
InitialConditionsAdisTSWindow,
|
||||
|
||||
Reference in new issue
Block a user