summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mobile-widgets/qml/DiveDetails.qml3
-rw-r--r--mobile-widgets/qmlmanager.cpp3
-rw-r--r--mobile-widgets/qmlmanager.h2
3 files changed, 3 insertions, 5 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)
});
}
}
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index d064c1807..0c434a4a9 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -1398,11 +1398,10 @@ void QMLManager::saveChangesCloud(bool forceRemoteSync)
git_local_only = glo;
}
-bool QMLManager::undoDelete(int)
+void QMLManager::undoDelete(int)
{
undoAction->activate(QAction::Trigger);
changesNeedSaving();
- return true;
}
void QMLManager::selectDive(int id)
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h
index 482ba7ecc..5a3662bfb 100644
--- a/mobile-widgets/qmlmanager.h
+++ b/mobile-widgets/qmlmanager.h
@@ -198,7 +198,7 @@ public slots:
bool toggleTags(bool toggle);
bool toggleCylinders(bool toggle);
bool toggleWeights(bool toggle);
- bool undoDelete(int id);
+ void undoDelete(int id);
QString addDive();
void addDiveAborted(int id);
void applyGpsData();