summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveDetailsEdit.qml
diff options
context:
space:
mode:
authorGravatar Joakim Bygdell <j.bygdell@gmail.com>2017-07-31 18:37:19 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-08-02 18:49:47 -0700
commitbc7d11860fb9550bf72bd6daaf566373e98959e3 (patch)
tree9f6e02973246abbf526c0c2c5adce72261244a21 /mobile-widgets/qml/DiveDetailsEdit.qml
parent97f1dc0b0186fc28056f091fa346f60228f7ce2c (diff)
downloadsubsurface-bc7d11860fb9550bf72bd6daaf566373e98959e3.tar.gz
QML UI: make sure textfields loose focus
For some reason the textfields on dive edit page did not loose focus when editing ended by press on the return key. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'mobile-widgets/qml/DiveDetailsEdit.qml')
-rw-r--r--mobile-widgets/qml/DiveDetailsEdit.qml33
1 files changed, 33 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml
index 4192b0e74..c9699d19e 100644
--- a/mobile-widgets/qml/DiveDetailsEdit.qml
+++ b/mobile-widgets/qml/DiveDetailsEdit.qml
@@ -96,6 +96,9 @@ Item {
TextField {
id: txtDate;
Layout.fillWidth: true
+ onEditingFinished: {
+ focus = false
+ }
}
Kirigami.Label {
Layout.alignment: Qt.AlignRight
@@ -105,6 +108,9 @@ Item {
TextField {
id: txtLocation;
Layout.fillWidth: true
+ onEditingFinished: {
+ focus = false
+ }
}
Kirigami.Label {
@@ -115,6 +121,9 @@ Item {
TextField {
id: txtGps
Layout.fillWidth: true
+ onEditingFinished: {
+ focus = false
+ }
}
Kirigami.Label {
@@ -141,6 +150,9 @@ Item {
id: txtDepth
Layout.fillWidth: true
validator: RegExpValidator { regExp: /[^-]*/ }
+ onEditingFinished: {
+ focus = false
+ }
}
Kirigami.Label {
Layout.alignment: Qt.AlignRight
@@ -151,6 +163,9 @@ Item {
id: txtDuration
Layout.fillWidth: true
validator: RegExpValidator { regExp: /[^-]*/ }
+ onEditingFinished: {
+ focus = false
+ }
}
Kirigami.Label {
@@ -161,6 +176,9 @@ Item {
TextField {
id: txtAirTemp
Layout.fillWidth: true
+ onEditingFinished: {
+ focus = false
+ }
}
Kirigami.Label {
@@ -171,6 +189,9 @@ Item {
TextField {
id: txtWaterTemp
Layout.fillWidth: true
+ onEditingFinished: {
+ focus = false
+ }
}
Kirigami.Label {
@@ -218,6 +239,9 @@ Item {
id: txtWeight
readOnly: text === "cannot edit multiple weight systems"
Layout.fillWidth: true
+ onEditingFinished: {
+ focus = false
+ }
}
Kirigami.Label {
@@ -241,6 +265,9 @@ Item {
id: txtGasMix
Layout.fillWidth: true
validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/i }
+ onEditingFinished: {
+ focus = false
+ }
}
Kirigami.Label {
@@ -251,6 +278,9 @@ Item {
TextField {
id: txtStartPressure
Layout.fillWidth: true
+ onEditingFinished: {
+ focus = false
+ }
}
Kirigami.Label {
@@ -261,6 +291,9 @@ Item {
TextField {
id: txtEndPressure
Layout.fillWidth: true
+ onEditingFinished: {
+ focus = false
+ }
}
Kirigami.Label {