[PATCH 1/2] Mark date field readonly on trip edit
Miika Turkia
miika.turkia at gmail.com
Sun Jan 17 02:53:50 PST 2016
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 at gmail.com>
---
desktop-widgets/maintab.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/desktop-widgets/maintab.cpp b/desktop-widgets/maintab.cpp
index 24cdcc4..197e5e7 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);
--
2.5.0
More information about the subsurface
mailing list