diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-05-30 18:21:08 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-30 18:21:08 +0900 |
commit | 2a4d981d0904230a0fb428b9acc77f11ddb7ad82 (patch) | |
tree | 8494a22a14cbc54967f65e5f637d21f44322e245 | |
parent | 56eaea6993f8a0ae72f7073a5f024007cdb33cc1 (diff) | |
download | subsurface-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>
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 6 | ||||
-rw-r--r-- | qt-ui/downloadfromdivecomputer.h | 1 |
2 files changed, 7 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) diff --git a/qt-ui/downloadfromdivecomputer.h b/qt-ui/downloadfromdivecomputer.h index 27e64c96f..de80c4028 100644 --- a/qt-ui/downloadfromdivecomputer.h +++ b/qt-ui/downloadfromdivecomputer.h @@ -43,6 +43,7 @@ public slots: void on_ok_clicked(); void on_cancel_clicked(); void runDialog(); + void stoppedDownloading(); void on_vendor_currentIndexChanged(const QString& vendor); private: Ui::DownloadFromDiveComputer *ui; |