mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
BC: Edit: Add X and Y column name for not defined bc type.
This commit is contained in:
1 parent
0546b304be
commit
e987962510
4 files changed
+15
-5
No files matched your search
@@ -51,7 +51,7 @@ class BoundaryConditionWindow(ASubMainWindow, ListedSubWindow):
|
||||
)
|
||||
|
||||
self._study = study
|
||||
self._lst = self._study.river.boundary_condition
|
||||
self._bcs = self._study.river.boundary_condition
|
||||
|
||||
self.setup_sc()
|
||||
self.setup_table()
|
||||
@@ -154,7 +154,7 @@ class BoundaryConditionWindow(ASubMainWindow, ListedSubWindow):
|
||||
def add(self):
|
||||
tab = self.current_tab()
|
||||
rows = self.index_selected_rows()
|
||||
if self._lst.len(tab) == 0 or len(rows) == 0:
|
||||
if self._bcs.len(tab) == 0 or len(rows) == 0:
|
||||
self._table[tab].add(0)
|
||||
else:
|
||||
self._table[tab].add(rows[0])
|
||||
@@ -196,10 +196,11 @@ class BoundaryConditionWindow(ASubMainWindow, ListedSubWindow):
|
||||
self._table[tab].redo()
|
||||
|
||||
def edit(self):
|
||||
tab = self.current_tab()
|
||||
rows = self.index_selected_rows()
|
||||
for row in rows:
|
||||
win = EditBoundaryConditionWindow(
|
||||
data=self._lst[row],
|
||||
data=self._bcs.get(tab, row),
|
||||
parent=self
|
||||
)
|
||||
win.show()
|
||||
@@ -5,6 +5,8 @@ from PyQt5.QtCore import QCoreApplication
|
||||
_translate = QCoreApplication.translate
|
||||
|
||||
table_headers = {
|
||||
"x": _translate("BoundaryCondition", "X"),
|
||||
"y": _translate("BoundaryCondition", "Y"),
|
||||
"time": _translate("BoundaryCondition", "Time"),
|
||||
"debit": _translate("BoundaryCondition", "Debit"),
|
||||
"z": _translate("BoundaryCondition", "Z (m)")
|
||||
|
||||
Reference in new issue
Block a user