diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-04-04 15:18:24 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-04-04 16:09:09 -0700 |
commit | 1f180552c9a5e901c3994f030f15d7cf6477305b (patch) | |
tree | bb89ef250c57f2cd62ed2d4c25666f05e581cc06 /mobile-widgets | |
parent | 96d12f5a3943aa0f08a1af645d22d3e1de8b8727 (diff) | |
download | subsurface-1f180552c9a5e901c3994f030f15d7cf6477305b.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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) |