summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-12-07 16:25:43 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-07 08:09:05 -0800
commit755ea74492984e4f6679ff4dc148f4b04effc380 (patch)
treef7221000fd579d9893d44002f0600e9bc962f70a /qt-ui/mainwindow.cpp
parentbb979260b08b28a0388c30534c773cb51d0b0b40 (diff)
downloadsubsurface-755ea74492984e4f6679ff4dc148f4b04effc380.tar.gz
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>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp7
1 files changed, 6 insertions, 1 deletions
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);
}
}