Planner: fix start time handling

We setup the startTime for the dive plan in too many places... but never
actually copied it into the planned dive.

Fixes #640

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-07-24 09:03:56 -07:00
parent 95466cb245
commit f29f41ae9e
2 changed files with 1 additions and 4 deletions

View file

@ -69,9 +69,6 @@ void DivePlannerPointsModel::createSimpleDive()
{
struct gasmix gas = { 0 };
// set the start time of the plan
diveplan.when = displayed_dive.when;
if (isPlanner())
// let's use the gas from the first cylinder
gas = displayed_dive.cylinder[0].gasmix;
@ -666,7 +663,6 @@ int DivePlannerPointsModel::rowCount(const QModelIndex &parent) const
DivePlannerPointsModel::DivePlannerPointsModel(QObject *parent) : QAbstractTableModel(parent), mode(NOTHING)
{
memset(&diveplan, 0, sizeof(diveplan));
startTime = QDateTime::currentDateTimeUtc();
}
DivePlannerPointsModel *DivePlannerPointsModel::instance()