diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-22 17:19:20 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-22 17:20:17 -0700 |
commit | c332bf2cfa6b71421043cde3655c06bbed270b7c (patch) | |
tree | 1d2626fad0227ca96ba7d17c28af201626d00102 | |
parent | e167506bdbdd3534372f5c3be12c50250ff0fd3a (diff) | |
download | subsurface-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>
-rw-r--r-- | qt-ui/mainwindow.cpp | 4 |
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.")); |