From 214bd0ed6e16933560bbea9fba3d151ad9be8d0b Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sat, 23 Aug 2014 11:49:28 -0300 Subject: Re-enable the edition of the Date after editing a trip. Since we can't edit the trip date, we need to remember to re-enable it after we disable it. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui/maintab.cpp') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index f381d72d5..920aaeafc 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -294,6 +294,7 @@ void MainTab::enableEdition(EditMode newEditMode) ui.dateEdit->setEnabled(false); editMode = TRIP; } else { + ui.dateEdit->setEnabled(true); if (amount_selected > 1) { displayMessage(tr("Multiple dives are being edited.")); } else { @@ -662,6 +663,7 @@ void MainTab::acceptChanges() struct dive *d; tabBar()->setTabIcon(0, QIcon()); // Notes tabBar()->setTabIcon(1, QIcon()); // Equipment + ui.dateEdit->setEnabled(true); hideMessage(); ui.equipmentTab->setEnabled(true); on_location_editingFinished(); // complete coordinates *before* saving @@ -847,6 +849,7 @@ void MainTab::rejectChanges() return; } } + ui.dateEdit->setEnabled(true); editMode = NONE; tabBar()->setTabIcon(0, QIcon()); // Notes tabBar()->setTabIcon(1, QIcon()); // Equipment -- cgit v1.2.3-70-g09d2