Add support to edit a planned dive

Left to do is to remove all the auto-added deco-points, aka the ones
that had entered==FALSE before we created a dive from the plan.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2013-12-07 16:25:43 +01:00 committed by Dirk Hohndel
parent bb979260b0
commit 755ea74492

View file

@ -878,6 +878,11 @@ void MainWindow::editCurrentDive()
ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE);
}
else if (defaultDC == "planned dive"){
// this looks like something is missing here
disableDcShortcuts();
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN);
ui.stackedWidget->setCurrentIndex(PLANNERPROFILE); // Planner.
ui.infoPane->setCurrentIndex(PLANNERWIDGET);
DivePlannerPointsModel::instance()->loadFromDive(d);
ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE);
}
}