From 755ea74492984e4f6679ff4dc148f4b04effc380 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Sat, 7 Dec 2013 16:25:43 +0100 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 78868e683..4b6581053 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -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); } } -- cgit v1.2.3-70-g09d2