aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-31 09:58:43 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-31 20:33:11 -0700
commit4982751bbee85e3015eb7c9de0b65c79153d9278 (patch)
tree6ffdf35b9c971918f84955def45235c7bbad7c79
parent9dd01da9c179564e16dd889039a7a7b9569b7db7 (diff)
downloadsubsurface-4982751bbee85e3015eb7c9de0b65c79153d9278.tar.gz
mobile/dive-details: add option to toggle the invalid flag
Simply for consistency with the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--mobile-widgets/qml/DiveDetails.qml5
1 files changed, 5 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml
index fd352b51a..a98b698c7 100644
--- a/mobile-widgets/qml/DiveDetails.qml
+++ b/mobile-widgets/qml/DiveDetails.qml
@@ -92,6 +92,11 @@ Kirigami.Page {
enabled: currentItem && currentItem.modelData && !currentItem.modelData.isTrip && currentItem.modelData.isTopLevel
onTriggered: manager.addTripForDive(currentItem.modelData.id)
}
+ property QtObject toggleInvalidAction: Kirigami.Action {
+ text: currentItem && currentItem.modelData && currentItem.modelData.isInvalid ? qsTr("Mark dive as valid") : qsTr("Mark dive as invalid")
+ visible: currentItem && currentItem.modelData
+ onTriggered: manager.toggleDiveInvalid(currentItem.modelData.id)
+ }
property QtObject undoAction: Kirigami.Action {
text: qsTr("Undo") + " " + manager.undoText
icon { name: ":/icons/undo.svg" }