From ee4ae49d37043f8b9a7f971cfefb758a7893f492 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 14 Apr 2017 13:43:48 -0700 Subject: 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 --- mobile-widgets/qml/HintsTextEdit.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mobile-widgets/qml/HintsTextEdit.qml') 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 -- cgit v1.2.3-70-g09d2