summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/maintab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/tab-widgets/maintab.cpp')
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index 7112458f1..eb8292b1a 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -270,6 +270,11 @@ void MainTab::toggleTriggeredColumn()
void MainTab::addDiveStarted()
{
+ ui.tabWidget->setCurrentIndex(0);
+ ui.tabWidget->setTabEnabled(2, false);
+ ui.tabWidget->setTabEnabled(3, false);
+ ui.tabWidget->setTabEnabled(4, false);
+ ui.tabWidget->setTabEnabled(5, false);
enableEdition(ADD);
}
@@ -339,6 +344,9 @@ void MainTab::enableEdition(EditMode newEditMode)
MainWindow::instance()->dive_list()->setEnabled(false);
MainWindow::instance()->setEnabledToolbar(false);
MainWindow::instance()->enterEditState();
+ ui.tabWidget->setTabEnabled(2, false);
+ ui.tabWidget->setTabEnabled(3, false);
+ ui.tabWidget->setTabEnabled(5, false);
if (isTripEdit) {
// we are editing trip location and notes
@@ -534,6 +542,8 @@ void MainTab::updateDiveInfo(bool clear)
ui.tabWidget->setTabText(0, tr("Notes"));
ui.tabWidget->setTabEnabled(1, true);
ui.tabWidget->setTabEnabled(2, true);
+ ui.tabWidget->setTabEnabled(3, true);
+ ui.tabWidget->setTabEnabled(4, true);
ui.tabWidget->setTabEnabled(5, true);
// Recover the tab selected for last dive
if (!lastSelectedDive)