summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/downloadfromdivecomputer.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-09-22 20:35:38 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-10-02 08:04:49 -0700
commit36676120ab59a60667f2591af55636517b41ff27 (patch)
tree7ce15fc3d5eef1fbdedc028a51de686dc603441f /desktop-widgets/downloadfromdivecomputer.cpp
parent8f3c85f58d0693a07df70a87b265cde0cdc860ac (diff)
downloadsubsurface-36676120ab59a60667f2591af55636517b41ff27.tar.gz
Import: clear table via model not via thread
Clearing the table in the thread leaves the model in an inconsistent state. Don't do that. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/downloadfromdivecomputer.cpp')
-rw-r--r--desktop-widgets/downloadfromdivecomputer.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp
index 57f1955ae..cb6af7bfd 100644
--- a/desktop-widgets/downloadfromdivecomputer.cpp
+++ b/desktop-widgets/downloadfromdivecomputer.cpp
@@ -367,7 +367,6 @@ void DownloadFromDCWidget::on_downloadCancelRetryButton_clicked()
// this means we are retrying - so we better clean out the partial
// list of downloaded dives from the last attempt
diveImportedModel->clearTable();
- clear_dive_table(diveImportedModel->thread.table());
}
updateState(DOWNLOADING);
@@ -517,7 +516,7 @@ void DownloadFromDCWidget::on_cancel_clicked()
return;
// now discard all the dives
- clear_dive_table(diveImportedModel->thread.table());
+ diveImportedModel->clearTable();
done(-1);
}