summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-12-21 20:21:56 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-10 09:25:57 -0700
commitdd8d8edc45dad1316aa5b5470247e14fb75d67e1 (patch)
tree2d0080fc49633750b46fbf65b145c44afa40f92f /mobile-widgets/qml
parentd55ea8f8750a7952d4e9e003bef57decc513d2d4 (diff)
downloadsubsurface-dd8d8edc45dad1316aa5b5470247e14fb75d67e1.tar.gz
mobile/divelist: don't set currentIndex on undo of dive deletion
The core sets the current dive when undoing something. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/DiveDetails.qml3
1 files changed, 1 insertions, 2 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml
index da2b30cf7..66e082163 100644
--- a/mobile-widgets/qml/DiveDetails.qml
+++ b/mobile-widgets/qml/DiveDetails.qml
@@ -155,12 +155,11 @@ Kirigami.Page {
}
onTriggered: {
var deletedId = currentItem.modelData.id
- var deletedIndex = diveDetailsListView.currentIndex
manager.deleteDive(deletedId)
pageStack.pop()
showPassiveNotification("Dive deleted", 5000, "Undo",
function() {
- diveDetailsListView.currentIndex = manager.undoDelete(deletedId) ? deletedIndex : diveDetailsListView.currentIndex
+ manager.undoDelete(deletedId)
});
}
}