summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-31 09:57:37 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-31 20:33:11 -0700
commit9dd01da9c179564e16dd889039a7a7b9569b7db7 (patch)
tree0a8d71829a92c42befc6b7bc7208453814f26c17 /mobile-widgets
parent2bf394581f9e9127c720494488952fa09ec35026 (diff)
downloadsubsurface-9dd01da9c179564e16dd889039a7a7b9569b7db7.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/DiveDetails.qml4
1 files changed, 1 insertions, 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