Mobile: clear dive data via model

Clearing the dive data directly in the core leaves us with an
inconsistent model. Therefore, clear via the model.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-09-26 13:37:44 +02:00 committed by Dirk Hohndel
parent f0fc1f3a56
commit 649ac1f83a
3 changed files with 10 additions and 2 deletions

View file

@ -171,6 +171,13 @@ void DiveListModel::updateDive(int i, dive *d)
insertDive(i);
}
void DiveListModel::clear()
{
beginResetModel();
clear_dive_file_data();
endResetModel();
}
void DiveListModel::reload()
{
beginResetModel();