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:
Dirk Hohndel 2014-10-20 17:36:24 -07:00
parent e1db94ea0c
commit 71d21c375c
4 changed files with 15 additions and 1 deletions

View file

@ -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?