diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-05-28 05:16:53 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-28 10:13:24 -0700 |
commit | e4a438c96cbf4e5df2933e85f68c7c0ba4516435 (patch) | |
tree | 14cf0ac600686e377b933466ede98132477f42aa | |
parent | f8a773b37f408f309d92cd7b90845a81e0d642c3 (diff) | |
download | subsurface-e4a438c96cbf4e5df2933e85f68c7c0ba4516435.tar.gz |
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 <dirk@hohndel.org>
-rw-r--r-- | qt-ui/diveplanner.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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(); |