From 9dd01da9c179564e16dd889039a7a7b9569b7db7 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 31 Mar 2020 09:57:37 -0700 Subject: [PATCH] mobile/dive-details: fix incorrect call to create trip This was using the myData alias that exists in the dive list but not on the dive details. This might work (because the models both use the same underlying base model), but given that we are using the currentItem of this ListView, I'm guessing that this would just silently fail (maybe with a warning in the log). Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DiveDetails.qml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index 9970a9455..fd352b51a 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -90,9 +90,7 @@ Kirigami.Page { text: qsTr("Create trip with dive") icon { name: ":/icons/list-add" } enabled: currentItem && currentItem.modelData && !currentItem.modelData.isTrip && currentItem.modelData.isTopLevel - onTriggered: { - manager.addTripForDive(currentItem.myData.id) - } + onTriggered: manager.addTripForDive(currentItem.modelData.id) } property QtObject undoAction: Kirigami.Action { text: qsTr("Undo") + " " + manager.undoText