summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/maintab.cpp5
-rw-r--r--qt-ui/maintab.h1
-rw-r--r--qt-ui/mainwindow.cpp3
3 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 82ab7c7e7..3885cd56c 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -851,6 +851,11 @@ void MainTab::reload()
mydive->what = copy_string(displayed_dive.what); \
}
+MainTab::EditMode MainTab::getEditMode() const
+{
+ return editMode;
+}
+
#define EDIT_VALUE(what) \
if (mydive->what == cd->what || copyPaste) { \
mydive->what = displayed_dive.what; \
diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h
index 6a55580b7..eeb19a7c1 100644
--- a/qt-ui/maintab.h
+++ b/qt-ui/maintab.h
@@ -100,6 +100,7 @@ slots:
void enableGeoLookupEdition();
void disableGeoLookupEdition();
void setCurrentLocationIndex();
+ EditMode getEditMode() const;
private:
Ui::MainTab ui;
WeightModel *weightModel;
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 99be8422c..23c36adaa 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -258,6 +258,9 @@ PlannerSettingsWidget *MainWindow::divePlannerSettingsWidget() {
void MainWindow::setDefaultState() {
setApplicationState("Default");
+ if (information()->getEditMode() != MainTab::NONE) {
+ ui.bottomLeft->currentWidget()->setEnabled(false);
+ }
}
void MainWindow::setLoadedWithFiles(bool f)