From abb3b03511dd4ba3aad8323bbb50a96a670d1df4 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 22 Mar 2016 17:19:20 -0700 Subject: Don't start Add or Plan while accessing cloud storage This avoids a race condition where we get confused about our internal state. Fixes #1031 Signed-off-by: Dirk Hohndel --- desktop-widgets/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'desktop-widgets') diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 5bb713b7c..df0190e10 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -780,6 +780,10 @@ void MainWindow::on_actionEditDeviceNames_triggered() bool MainWindow::plannerStateClean() { + if (progressDialog) + // we are accessing the cloud, so let's not switch into Add or Plan mode + return false; + if (DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING || information()->isEditing()) { QMessageBox::warning(this, tr("Warning"), tr("Please save or cancel the current dive edit before trying to add a dive.")); -- cgit v1.2.3-70-g09d2