aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 8126acf10..f01d3ea48 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -297,8 +297,6 @@ MainWindow::MainWindow() : QMainWindow(),
// now let's set up some connections
connect(graphics, &ProfileWidget2::enableToolbar ,this, &MainWindow::setEnabledToolbar);
- connect(graphics, &ProfileWidget2::disableShortcuts, this, &MainWindow::disableShortcuts);
- connect(graphics, &ProfileWidget2::enableShortcuts, this, &MainWindow::enableShortcuts);
connect(graphics, &ProfileWidget2::editCurrentDive, this, &MainWindow::editCurrentDive);
connect(&diveListNotifier, &DiveListNotifier::settingsChanged, graphics, &ProfileWidget2::settingsChanged);
@@ -771,6 +769,7 @@ void MainWindow::on_actionReplanDive_triggered()
// put us in PLAN mode
setApplicationState(ApplicationState::PlanDive);
+ disableShortcuts(true);
graphics->setPlanState(&displayed_dive, 0);
plannerWidgets->replanDive();
}
@@ -783,6 +782,7 @@ void MainWindow::on_actionDivePlanner_triggered()
// put us in PLAN mode
setApplicationState(ApplicationState::PlanDive);
+ disableShortcuts(true);
graphics->setPlanState(&displayed_dive, 0);
plannerWidgets->planDive();
}
@@ -1515,7 +1515,7 @@ void MainWindow::editCurrentDive()
if (mainTab->isEditing() || DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING)
return;
- disableShortcuts();
+ disableShortcuts(false);
copy_dive(current_dive, &displayed_dive); // Work on a copy of the dive
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::ADD);
DivePlannerPointsModel::instance()->loadFromDive(&displayed_dive);