[PATCH 6/7] Add support to edit a planned dive

Anton Lundin glance at acc.umu.se
Sat Dec 7 07:25:43 UTC 2013


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 at acc.umu.se>
---
 qt-ui/mainwindow.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index e456991..0725162 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);
 	}
 }
-- 
1.8.3.2



More information about the subsurface mailing list