From 83259008e763d3cc120c826f58f91a0ff62b6b92 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Sun, 28 Jan 2018 11:28:01 +0100 Subject: mobile cleanup: unduplicate code and do not loop over dives (3) See e6e1473e6. Exact same commit but here for the list of divemaster. The careful reader will spot a small addition to the clearDetailsEdit() QML function. Two more field are cleared. Signed-off-by: Jan Mulder --- mobile-widgets/qml/DiveDetailsEdit.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mobile-widgets/qml/DiveDetailsEdit.qml') diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml index 8373ba5b7..c623a856f 100644 --- a/mobile-widgets/qml/DiveDetailsEdit.qml +++ b/mobile-widgets/qml/DiveDetailsEdit.qml @@ -48,6 +48,8 @@ Item { detailsEdit.depthText = "" detailsEdit.airtempText = "" detailsEdit.watertempText = "" + detailsEdit.divemasterText = "" + detailsEdit.buddyText = "" suitBox.currentIndex = -1 buddyBox.currentIndex = -1 divemasterBox.currentIndex = -1 @@ -248,8 +250,7 @@ Item { } HintsTextEdit { id: divemasterBox - model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ? - diveDetailsListView.currentItem.modelData.dive.divemasterList : null + model: manager.divemasterList inputMethodHints: Qt.ImhNoPredictiveText Layout.fillWidth: true } -- cgit v1.2.3-70-g09d2