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>
This commit is contained in:
Dirk Hohndel 2020-03-31 09:57:37 -07:00
parent 2bf394581f
commit 9dd01da9c1

View file

@ -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