mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Date/time parameters: fixed the link between the start date in the study settings and the display in the tables
This commit is contained in:
1 parent
b7aab9f263
commit
6586a7b191
13 files changed
+67
-13
No files matched your search
@@ -87,7 +87,9 @@ class TableModel(PamhyrTableModel):
|
||||
if self._opt_data == "time":
|
||||
value = timestamp_to_old_pamhyr_date(int(v))
|
||||
else:
|
||||
value = str(datetime.fromtimestamp(v))
|
||||
value = str(
|
||||
self._start_date + timedelta(seconds=float(v))
|
||||
)
|
||||
else:
|
||||
value = f"{v}"
|
||||
|
||||
@@ -104,6 +106,10 @@ class TableModel(PamhyrTableModel):
|
||||
column = index.column()
|
||||
|
||||
try:
|
||||
if (self._data.header[column] == "time"
|
||||
and self._opt_data == "date"):
|
||||
value = self.date_to_elapsed_seconds(value)
|
||||
|
||||
row = self.get_true_data_row(row)
|
||||
|
||||
self._undo.push(
|
||||
|
||||
@@ -117,7 +117,8 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
||||
},
|
||||
data=self._data,
|
||||
undo=self._undo_stack,
|
||||
opt_data=self._study.time_system
|
||||
opt_data=self._study.time_system,
|
||||
start_date=self._study.date
|
||||
)
|
||||
|
||||
table.setModel(self._table)
|
||||
|
||||
Reference in new issue
Block a user