mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
QML UI: fix broken delete from dive details page
Trying to close the non-existing context drawer caused the function to abort (and consequently not to delete the dive). Fixes #309 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
cc6c41c846
commit
74a5511b39
1 changed files with 0 additions and 2 deletions
|
@ -75,7 +75,6 @@ Kirigami.Page {
|
|||
text: qsTr("Delete dive")
|
||||
iconName: "trash-empty"
|
||||
onTriggered: {
|
||||
contextDrawer.close()
|
||||
var deletedId = diveDetailsListView.currentItem.modelData.dive.id
|
||||
var deletedIndex = diveDetailsListView.currentIndex
|
||||
manager.deleteDive(deletedId)
|
||||
|
@ -84,7 +83,6 @@ Kirigami.Page {
|
|||
function() {
|
||||
diveDetailsListView.currentIndex = manager.undoDelete(deletedId) ? deletedIndex : diveDetailsListView.currentIndex
|
||||
});
|
||||
contextDrawer.close() // at least one iPhone user has the drawer pop open after delete
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue