From e4d2092f339008b2a0180e57501e85683f20aba0 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 19 Sep 2015 21:09:58 -0700 Subject: Uemis downloader: start downloading using the correct dive ID The logic to pick the initial dive ID for the uemis downloader was very confused, and did not work at all when restarting a download when the Uemis filled up, and the "Force download all dives" flag was set. It also required a rather odd Uemis-specific callback from the download UI because of how it picked the initial ID. This changes the logic to just look at the list of downloaded dives when restarting, which simplifies the logic a lot, gets rid of the odd special callback, and also means that the whole "Force download" issue just goes away. It seems to work now. Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- qt-ui/downloadfromdivecomputer.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index 7e18dae70..1fef9f6bf 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -298,14 +298,6 @@ void DownloadFromDCWidget::on_downloadCancelRetryButton_clicked() diveImportedModel->clearTable(); clear_table(&downloadTable); } - if (ui.vendor->currentText() == "Uemis") { - if (currentState == ERROR && downloadTable.nr > 0) - // let the uemis code know how far we've gotten - uemis_set_max_diveid_from_dialog(downloadTable.dives[downloadTable.nr - 1]->dc.diveid); - else - // fresh download, so only look at what's in the dive_table - uemis_set_max_diveid_from_dialog(0); - } updateState(DOWNLOADING); // you cannot cancel the dialog, just the download -- cgit v1.2.3-70-g09d2