From 09cec219f79f67eab4a0524b6116ea2920bb00cb Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 17 Jan 2016 12:53:50 +0200 Subject: [PATCH] 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 --- qt-ui/maintab.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index e8f692196..ede3cb5ef 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -523,6 +523,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(); @@ -561,6 +562,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);