aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-08-23 11:49:28 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-23 08:10:47 -0700
commit214bd0ed6e16933560bbea9fba3d151ad9be8d0b (patch)
treef15868086b2cb16200ea6d91380680f9432aaef1 /qt-ui/maintab.cpp
parent9acf1caca3370f3e7eaf53c88e5419a62c07e4cb (diff)
downloadsubsurface-214bd0ed6e16933560bbea9fba3d151ad9be8d0b.tar.gz
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 <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp3
1 files changed, 3 insertions, 0 deletions
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