From 394ddba013f159829283b58eecbeb0b905077ced Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 17 Jan 2016 12:53:50 +0200 Subject: Mark date field readonly on trip edit The date comes from the first dive in trip, thus no need to allow editing (especially since the edited date seems to be discarded in any case). Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- desktop-widgets/maintab.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop-widgets/maintab.cpp b/desktop-widgets/maintab.cpp index 24cdcc477..197e5e7c4 100644 --- a/desktop-widgets/maintab.cpp +++ b/desktop-widgets/maintab.cpp @@ -519,6 +519,7 @@ void MainTab::updateDiveInfo(bool clear) ui.TypeLabel->setVisible(false); ui.waterTempLabel->setVisible(false); ui.watertemp->setVisible(false); + ui.dateEdit->setReadOnly(true); ui.diveTripLocation->show(); ui.location->hide(); ui.editDiveSiteButton->hide(); @@ -557,6 +558,7 @@ void MainTab::updateDiveInfo(bool clear) ui.DiveType->setVisible(true); ui.waterTempLabel->setVisible(true); ui.watertemp->setVisible(true); + ui.dateEdit->setReadOnly(false); /* and fill them from the dive */ ui.rating->setCurrentStars(displayed_dive.rating); ui.visibility->setCurrentStars(displayed_dive.visibility); -- cgit v1.2.3-70-g09d2