From e4a438c96cbf4e5df2933e85f68c7c0ba4516435 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 28 May 2014 05:16:53 -0700 Subject: Dive planner: remove the fake dive earlier on cancel This way it's already gone from the dive list before it gets reprocessed. Signed-off-by: Dirk Hohndel --- qt-ui/diveplanner.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'qt-ui/diveplanner.cpp') diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index cf09ebaba..e8e0b2ca3 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -256,7 +256,6 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg connect(ui.buttonBox, SIGNAL(rejected()), plannerModel, SLOT(cancelPlan())); connect(plannerModel, SIGNAL(planCreated()), MainWindow::instance(), SLOT(removeFakeDiveForAddAndPlan())); connect(plannerModel, SIGNAL(planCreated()), MainWindow::instance(), SLOT(showProfile())); - connect(plannerModel, SIGNAL(planCanceled()), MainWindow::instance(), SLOT(removeFakeDiveForAddAndPlan())); connect(plannerModel, SIGNAL(planCanceled()), MainWindow::instance(), SLOT(showProfile())); /* set defaults. */ @@ -654,8 +653,8 @@ void DivePlannerPointsModel::cancelPlan() return; } } - clear(); // we unselected all dives earlier, so restore that first and then recreate the dive list + MainWindow::instance()->removeFakeDiveForAddAndPlan(); MainWindow::instance()->dive_list()->restoreSelection(); MainWindow::instance()->dive_list()->reload(DiveTripModel::CURRENT); MainWindow::instance()->refreshDisplay(); -- cgit v1.2.3-70-g09d2