From 1f2159dd0ce9f5007eb1e38f34c82222cace649d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 27 May 2014 15:27:53 -0700 Subject: Planner: return Profile widget to profile state This still crashes when canceling the plan. And doesn't display the correct dive profile until you switch to a different dive and back. And Keyboard focus is wrong. Signed-off-by: Dirk Hohndel --- qt-ui/diveplanner.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index c02a5b34d..41f265ffa 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -251,7 +251,7 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int))); connect(ui.lastStop, SIGNAL(toggled(bool)), plannerModel, SLOT(setLastStop6m(bool))); - // Creating the plan + // Creating (and canceling) the plan connect(ui.buttonBox, SIGNAL(accepted()), plannerModel, SLOT(createPlan())); connect(ui.buttonBox, SIGNAL(rejected()), plannerModel, SLOT(cancelPlan())); connect(plannerModel, SIGNAL(planCreated()), MainWindow::instance(), SLOT(removeFakeDiveForAddAndPlan())); @@ -666,6 +666,7 @@ void DivePlannerPointsModel::cancelPlan() stagingDive = NULL; } setPlanMode(NOTHING); + MainWindow::instance()->graphics()->setProfileState(); diveplan.dp = NULL; } @@ -877,4 +878,5 @@ void DivePlannerPointsModel::createPlan() CylindersModel::instance()->setDive(current_dive); CylindersModel::instance()->update(); plannerModel->setRecalc(oldRecalc); + MainWindow::instance()->graphics()->setProfileState(); } -- cgit v1.2.3-70-g09d2