summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-08-14 18:09:17 +0200
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2019-09-14 13:20:59 +0200
commit0026aa395599489c09be3b7892b96923c670b7cf (patch)
treedf1afd69466092143472ef5411d86cf141945e57 /mobile-widgets/qml
parent57b77c90b9dad6a114a13fe08b8ae7b986039de8 (diff)
downloadsubsurface-0026aa395599489c09be3b7892b96923c670b7cf.tar.gz
Mobile: replace clear()/addAllDives() pairs by reload()
The clear()/addAllDives() pair was bogus as the former didn't clear the model (this is not possible anymore - the model represents the core dive list) and the latter readded all dives again. Replace this by a reload() function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/DownloadFromDiveComputer.qml3
1 files changed, 1 insertions, 2 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml
index b80412673..a9cde6332 100644
--- a/mobile-widgets/qml/DownloadFromDiveComputer.qml
+++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml
@@ -390,8 +390,7 @@ Kirigami.Page {
manager.appendTextToLog("Save downloaded dives that were selected")
importModel.recordDives()
manager.saveChangesLocal()
- diveModel.clear()
- diveModel.addAllDives()
+ diveModel.reload()
pageStack.pop();
download.text = qsTr("Download")
divesDownloaded = false