summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index a3d6c4333..df0190e10 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -250,7 +250,7 @@ MainWindow::MainWindow() : QMainWindow(),
set_git_update_cb(&updateProgress);
// Toolbar Connections related to the Profile Update
- SettingsObjectWrapper *sWrapper = SettingsObjectWrapper::instance(); sWrapper->techDetails;
+ SettingsObjectWrapper *sWrapper = SettingsObjectWrapper::instance();
connect(ui.profCalcAllTissues, &QAction::triggered, sWrapper->techDetails, &TechnicalDetailsSettings::setCalcalltissues);
connect(ui.profCalcCeiling, &QAction::triggered, sWrapper->techDetails, &TechnicalDetailsSettings::setCalcceiling);
connect(ui.profDcCeiling, &QAction::triggered, sWrapper->techDetails, &TechnicalDetailsSettings::setDCceiling);
@@ -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."));
@@ -1300,8 +1304,6 @@ void MainWindow::readSettings()
{
static bool firstRun = true;
- SettingsObjectWrapper *settings = SettingsObjectWrapper::instance();
-
QSettings s; //WARNING: Why those prefs are not on the prefs struct?
s.beginGroup("DiveComputer");
default_dive_computer_vendor = getSetting(s, "dive_computer_vendor");
@@ -1853,7 +1855,6 @@ void MainWindow::editCurrentDive()
void MainWindow::turnOffNdlTts()
{
- const bool triggered = false;
SettingsObjectWrapper::instance()->techDetails->setCalcndltts(false);
}