From 7bca367c57af95bd7b863e398f810b2efe38878c Mon Sep 17 00:00:00 2001 From: Robert Helling Date: Mon, 11 Apr 2016 21:10:46 +0200 Subject: Upon undoing a dive deletion select that dive Before it had the next dive still selected. Fixes #1053 Signed-off-by: Robert C. Helling Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mobile-widgets/qmlmanager.cpp') diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 6ea9b57f2..c225f689e 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -816,11 +816,11 @@ void QMLManager::saveChangesCloud(bool forceRemoteSync) alreadySaving = false; } -void QMLManager::undoDelete(int id) +bool QMLManager::undoDelete(int id) { if (!deletedDive || deletedDive->id != id) { qDebug() << "can't find the deleted dive"; - return; + return false; } if (deletedTrip) insert_trip(&deletedTrip); @@ -840,6 +840,7 @@ void QMLManager::undoDelete(int id) changesNeedSaving(); deletedDive = NULL; deletedTrip = NULL; + return true; } void QMLManager::deleteDive(int id) -- cgit v1.2.3-70-g09d2