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>
This commit is contained in:
Tomaz Canabrava 2014-08-23 11:49:28 -03:00 committed by Dirk Hohndel
parent 9acf1caca3
commit 214bd0ed6e

View file

@ -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