summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
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-02-26 09:16:11 +0100
commit09cec219f79f67eab4a0524b6116ea2920bb00cb (patch)
tree9279b4f5692a212659f3864ec663286fc2be7eea /qt-ui/maintab.cpp
parentcd44aabb5f4f02ac290bd43579a029f09e915ad5 (diff)
downloadsubsurface-09cec219f79f67eab4a0524b6116ea2920bb00cb.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>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp2
1 files changed, 2 insertions, 0 deletions
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);