summaryrefslogtreecommitdiffstats
path: root/qt-ui/downloadfromdivecomputer.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-30 18:21:08 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-30 18:21:08 +0900
commit2a4d981d0904230a0fb428b9acc77f11ddb7ad82 (patch)
tree8494a22a14cbc54967f65e5f637d21f44322e245 /qt-ui/downloadfromdivecomputer.cpp
parent56eaea6993f8a0ae72f7073a5f024007cdb33cc1 (diff)
downloadsubsurface-2a4d981d0904230a0fb428b9acc77f11ddb7ad82.tar.gz
Fixed running the Download dialog multiple times
We never reset the 'downloading' variable. Solved-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.cpp')
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index c1d74fb3a..b0bdea739 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -68,6 +68,11 @@ void DownloadFromDCWidget::runDialog()
show();
}
+void DownloadFromDCWidget::stoppedDownloading()
+{
+ downloading = false;
+}
+
void DownloadFromDCWidget::on_vendor_currentIndexChanged(const QString& vendor)
{
QAbstractItemModel *currentModel = ui->product->model();
@@ -179,6 +184,7 @@ void DownloadThread::run()
DownloadFromDCWidget *dfdcw = DownloadFromDCWidget::instance();
do_libdivecomputer_import(data);
process_dives(TRUE, dfdcw->preferDownloaded());
+ dfdcw->stoppedDownloading();
}
InterfaceThread::InterfaceThread(QObject* parent, device_data_t* data): QThread(parent), data(data)