From 697974ab58a30bccb2a64ecd870028f2d2e50686 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava <[email protected]> Date: Thu, 14 Aug 2014 15:53:59 -0300 Subject: [PATCH 2/2] 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 <[email protected]> --- qt-ui/maintab.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index e8087c7..7aa3e41 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 -- 2.1.0
_______________________________________________ subsurface mailing list [email protected] http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
