From 36676120ab59a60667f2591af55636517b41ff27 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 22 Sep 2019 20:35:38 +0200 Subject: 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 --- desktop-widgets/downloadfromdivecomputer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'desktop-widgets') 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); } -- cgit v1.2.3-70-g09d2