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>
This commit is contained in:
Dirk Hohndel 2016-03-22 17:19:20 -07:00
parent 48007ebc30
commit abb3b03511

View file

@ -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."));