summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2019-01-01 18:02:04 +0100
committerGravatar Robert C. Helling <helling@atdotde.de>2019-01-08 10:39:06 +0100
commitc349692d984f417bf56f5fecb8f733d8fb007518 (patch)
treed66682b3d0426ad03bc9d53f6190c0023e0fd344 /desktop-widgets/mainwindow.cpp
parentf1fc89b978c178fcd0f4f3ddb7629dc7df0d939d (diff)
downloadsubsurface-c349692d984f417bf56f5fecb8f733d8fb007518.tar.gz
Helper function to determined planned dives
... to reduce code duplication. Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index aba1cfc63..d836e8e61 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -965,7 +965,7 @@ void MainWindow::on_actionReplanDive_triggered()
{
if (!plannerStateClean() || !current_dive)
return;
- else if (!current_dive->dc.model || strcmp(current_dive->dc.model, "planned dive")) {
+ else if (!is_dc_planner(&current_dive->dc)) {
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;