summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2016-01-17 12:53:50 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-17 10:45:29 -0800
commit394ddba013f159829283b58eecbeb0b905077ced (patch)
tree897ff8327a2c70b95e61ad2508e95d87f135ac41
parentf28f03afe27b398688a35e7bcff555775f9b5fcf (diff)
downloadsubsurface-394ddba013f159829283b58eecbeb0b905077ced.tar.gz
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 <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--desktop-widgets/maintab.cpp2
1 files changed, 2 insertions, 0 deletions
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);