aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-05 22:53:32 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-05 22:53:32 -0800
commite774c8077b516652dc0139a5bac93e60f0ed9b9f (patch)
treebe63b54c6b66198e11c18564e83e56bce6db20eb /qt-mobile/qml
parent415536aba9cc805c2ed2df2e6981820e2b0680b2 (diff)
downloadsubsurface-e774c8077b516652dc0139a5bac93e60f0ed9b9f.tar.gz
QML UI: allow edit of dive date and time
This is a bit more complicated because we are asking the user to edit the text field instead of giving them a date and time picker. This is not a great choice, but let's run with it for now. One downside is that the user is likely going to edit the date "Oct 29" -> "Oct 25" without adjusting the day of the week. And if we then try to parse that Qt correctly complains about an invalid date. So we hack around this by removing the day of the week from both the format and the date entered (which of course now will break things if the user did, in fact, adjust the day of the week). As I said, not a great solution. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml')
-rw-r--r--qt-mobile/qml/DiveDetails.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml
index a99aa628c..27a8996da 100644
--- a/qt-mobile/qml/DiveDetails.qml
+++ b/qt-mobile/qml/DiveDetails.qml
@@ -52,9 +52,10 @@ MobileComponents.Page {
iconName: checked ? "view-readermode" : "document-edit"
onTriggered: {
if (diveDetailsWindow.state == "edit") {
- manager.commitChanges(dive_id, detailsEdit.locationText, detailsEdit.gpsText, detailsEdit.durationText,
+ manager.commitChanges(dive_id, detailsEdit.dateText, detailsEdit.locationText, detailsEdit.gpsText, detailsEdit.durationText,
detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText, detailsEdit.suitText,
detailsEdit.buddyText, detailsEdit.divemasterText, detailsEdit.notesText)
+ date = detailsEdit.dateText
location = detailsEdit.locationText
// gps = detailsEdit.gps
duration = detailsEdit.durationText