mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Recalculate the decompression if the date / time of a dive changes
The pre-existing tissue load going into a dive can change if the start time of a dive changes. Therefore we need to recalculate the ceiling when editing start time (or date) of a dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e1db94ea0c
commit
71d21c375c
4 changed files with 15 additions and 1 deletions
|
@ -978,6 +978,7 @@ void MainTab::on_dateEdit_dateChanged(const QDate &date)
|
|||
dateTime.setTimeSpec(Qt::UTC);
|
||||
dateTime.setDate(date);
|
||||
DivePlannerPointsModel::instance()->getDiveplan().when = displayed_dive.when = dateTime.toTime_t();
|
||||
emit dateTimeChanged();
|
||||
}
|
||||
|
||||
void MainTab::on_timeEdit_timeChanged(const QTime &time)
|
||||
|
@ -989,6 +990,7 @@ void MainTab::on_timeEdit_timeChanged(const QTime &time)
|
|||
dateTime.setTimeSpec(Qt::UTC);
|
||||
dateTime.setTime(time);
|
||||
DivePlannerPointsModel::instance()->getDiveplan().when = displayed_dive.when = dateTime.toTime_t();
|
||||
emit dateTimeChanged();
|
||||
}
|
||||
|
||||
// changing the tags on multiple dives is semantically strange - what's the right thing to do?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue