From c332bf2cfa6b71421043cde3655c06bbed270b7c 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 --- qt-ui/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index e0476381f..9a7490576 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -686,6 +686,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