aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index d2121e510..2be60edb7 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -819,3 +819,23 @@ void MainWindow::on_actionImportCSV_triggered()
process_dives(TRUE, FALSE);
refreshDisplay();
}
+
+
+void MainWindow::editCurrentDive()
+{
+ struct dive *d = current_dive;
+ QString defaultDC(d->dc.model);
+
+ if (defaultDC == tr("manually added dive")){
+ disableDcShortcuts();
+ DivePlannerPointsModel::instance()->setPlanMode(false);
+ ui.stackedWidget->setCurrentIndex(PLANNERPROFILE); // Planner.
+ ui.infoPane->setCurrentIndex(MAINTAB);
+ DivePlannerPointsModel::instance()->loadFromDive(d);
+ ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE);
+ }
+ else if (defaultDC == tr("Simulated Dive")){
+
+ }
+
+}