From c349692d984f417bf56f5fecb8f733d8fb007518 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Tue, 1 Jan 2019 18:02:04 +0100 Subject: Helper function to determined planned dives ... to reduce code duplication. Signed-off-by: Robert C. Helling --- desktop-widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop-widgets') 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(¤t_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; -- cgit v1.2.3-70-g09d2