From 1f180552c9a5e901c3994f030f15d7cf6477305b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 4 Apr 2020 15:18:24 -0700 Subject: mobile/edits: ensure changesNeedSaving is called These appear to be the only cases where we forgot to ensure data is saved. And pastDiveData is currently not called as the UI to use it has been removed. Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index f3db0814b..eca75b678 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1410,6 +1410,7 @@ void QMLManager::toggleDiveInvalid(int id) return; } Command::editInvalid(!d->invalid, true); + changesNeedSaving(); } bool QMLManager::toggleDiveSite(bool toggle) @@ -1510,6 +1511,7 @@ void QMLManager::pasteDiveData(int id) return; } Command::pasteDives(m_copyPasteDive, what); + changesNeedSaving(); } void QMLManager::cancelDownloadDC() @@ -1533,6 +1535,8 @@ int QMLManager::addDive() fixup_dive(&d); // addDive takes over the dive and clears out the structure passed in + // we do NOT save the modified data at this stage because of the UI flow here... this will + // be saved once the user finishes editing the newly added dive Command::addDive(&d, autogroup, true); if (verbose) -- cgit v1.2.3-70-g09d2