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>
This commit is contained in:
Berthold Stoeger 2019-09-22 20:35:38 +02:00 committed by Dirk Hohndel
parent 8f3c85f58d
commit 36676120ab

View file

@ -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);
}