summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-05-07 22:59:12 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-08 10:02:45 -0700
commit9d8eb1042125e4e33b593f37aec2d5bab13f1ac6 (patch)
tree3064a137d3181f889d69e31d67679d3c8469ce5f /qt-ui/mainwindow.cpp
parent69b4a404b9961bc9b3b2f3cbbf7e0bc634f3a5dd (diff)
downloadsubsurface-9d8eb1042125e4e33b593f37aec2d5bab13f1ac6.tar.gz
Only warn when trying to replan a logged dive
If there are more than 100 samples, average some of them so we end up with no more than 100. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 23f9551f1..970c0f739 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -596,8 +596,9 @@ void MainWindow::on_actionReplanDive_triggered()
if (!plannerStateClean() || !current_dive || !current_dive->dc.model)
return;
else if (strcmp(current_dive->dc.model, "planned dive")) {
- QMessageBox::warning(this, tr("Warning"), tr("trying to replan a dive that's not a planned dive."));
- return;
+ if (QMessageBox::warning(this, tr("Warning"), tr("trying to replan a dive that's not a planned dive."),
+ QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel)
+ return;
}
// put us in PLAN mode
DivePlannerPointsModel::instance()->clear();