summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/HintsTextEdit.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-04-14 13:43:48 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-04-14 13:43:48 -0700
commitee4ae49d37043f8b9a7f971cfefb758a7893f492 (patch)
tree54b8a54e7e27e3524b1667cf391d59e2551bfa97 /mobile-widgets/qml/HintsTextEdit.qml
parent525cd4c9e386767fa44eb8e3cbab13f25027da91 (diff)
downloadsubsurface-ee4ae49d37043f8b9a7f971cfefb758a7893f492.tar.gz
QML UI: don't populate hints texts when adding dive
If we don't have values for the HintsTextEdit fields, don't show any values. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/HintsTextEdit.qml')
-rw-r--r--mobile-widgets/qml/HintsTextEdit.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/mobile-widgets/qml/HintsTextEdit.qml b/mobile-widgets/qml/HintsTextEdit.qml
index 41ae2b225..fb9cee417 100644
--- a/mobile-widgets/qml/HintsTextEdit.qml
+++ b/mobile-widgets/qml/HintsTextEdit.qml
@@ -87,7 +87,7 @@ TextField {
id: hintsView
anchors.fill: parent
clip: true
- onCurrentIndexChanged: root.text = model[currentIndex];
+ onCurrentIndexChanged: root.text = currentIndex === -1 ? "" : model[currentIndex];
delegate: Kirigami.BasicListItem {
label: modelData