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>
This commit is contained in:
Dirk Hohndel 2020-04-04 15:18:24 -07:00
parent 96d12f5a39
commit 1f180552c9

View file

@ -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)