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:41:15 -0700 |
commit | abb3b03511dd4ba3aad8323bbb50a96a670d1df4 (patch) | |
tree | d74ac4debc3fc38f99216382a65b972e38b58978 /desktop-widgets | |
parent | 48007ebc3039525d2ff96dbcf944444009b67537 (diff) | |
download | subsurface-abb3b03511dd4ba3aad8323bbb50a96a670d1df4.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 'desktop-widgets')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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.")); |