diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-09-26 13:37:44 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-09-27 16:33:37 -0700 |
commit | 649ac1f83a7c2a5254363682c2c7cce9fd680ffe (patch) | |
tree | 2ed124dfded9393aa01488054f7309604bea3886 /mobile-widgets | |
parent | f0fc1f3a56d7b4ace484d79d43089bceb64de777 (diff) | |
download | subsurface-649ac1f83a7c2a5254363682c2c7cce9fd680ffe.tar.gz |
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>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 858f2c730..126cca7b8 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -277,7 +277,7 @@ void QMLManager::applicationStateChanged(Qt::ApplicationState state) void QMLManager::openLocalThenRemote(QString url) { - clear_dive_file_data(); + DiveListModel::instance()->clear(); setNotificationText(tr("Open local dive data file")); QByteArray fileNamePrt = QFile::encodeName(url); bool glo = git_local_only; @@ -730,7 +730,7 @@ void QMLManager::loadDivesWithValidCredentials() // if we aren't switching from no-cloud mode, let's clear the dive data if (!noCloudToCloud) { appendTextToLog("Clear out in memory dive data"); - clear_dive_file_data(); + DiveListModel::instance()->clear(); } else { appendTextToLog("Switching from no cloud mode; keep in memory dive data"); } |