summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-22 17:19:20 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-22 17:20:17 -0700
commitc332bf2cfa6b71421043cde3655c06bbed270b7c (patch)
tree1d2626fad0227ca96ba7d17c28af201626d00102 /qt-ui/mainwindow.cpp
parente167506bdbdd3534372f5c3be12c50250ff0fd3a (diff)
downloadsubsurface-c332bf2cfa6b71421043cde3655c06bbed270b7c.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp4
1 files changed, 4 insertions, 0 deletions
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."));