summaryrefslogtreecommitdiffstats
path: root/qt-ui/downloadfromdivecomputer.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-20 22:30:04 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-20 23:28:04 -0700
commit79f15e913b9029205686ef6c080eb136ff99e0cf (patch)
tree56e7c94829f56eb118db339e98402e74f121229f /qt-ui/downloadfromdivecomputer.cpp
parent4bccee238cec25ed9053bc8605c2af4c2c9569b4 (diff)
downloadsubsurface-79f15e913b9029205686ef6c080eb136ff99e0cf.tar.gz
Uemis downloader: allow continuing download by clicking Retry
When we run out of space in the Uemis filesystem we return an error. The user could reasonably unplug the SDA, insert it again and then retry to continue the download (that's what we tell them to do). In that case we need to make sure we start at the correct dive otherwise the same dives keep getting downloaded over and over again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.cpp')
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index d4deff268..5f0487e8c 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -3,6 +3,7 @@
#include "mainwindow.h"
#include "divelistview.h"
#include "display.h"
+#include "uemis.h"
#include <QTimer>
#include <QFileDialog>
@@ -284,6 +285,14 @@ 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