diff options
author | Robert Helling <helling@atdotde.de> | 2016-04-11 21:10:46 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-11 12:41:41 -0700 |
commit | 7bca367c57af95bd7b863e398f810b2efe38878c (patch) | |
tree | 518508e9494ef843a8f28cf6dd2ab90ea636ed03 /mobile-widgets/qml | |
parent | e1af20728e76acbc3cd6e5e4b8cfbbd31a70f028 (diff) | |
download | subsurface-7bca367c57af95bd7b863e398f810b2efe38878c.tar.gz |
Upon undoing a dive deletion select that dive
Before it had the next dive still selected.
Fixes #1053
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index 3d146ce46..d562e0a98 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -54,11 +54,12 @@ Kirigami.Page { onTriggered: { contextDrawer.close() var deletedId = diveDetailsListView.currentItem.modelData.dive.id + var deletedIndex = diveDetailsListView.currentIndex manager.deleteDive(deletedId) stackView.pop() showPassiveNotification("Dive deleted", 3000, "Undo", function() { - manager.undoDelete(deletedId) + diveDetailsListView.currentIndex = manager.undoDelete(deletedId) ? deletedIndex : diveDetailsListView.currentIndex }); } } |