From 2a4d981d0904230a0fb428b9acc77f11ddb7ad82 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 30 May 2013 18:21:08 +0900 Subject: Fixed running the Download dialog multiple times We never reset the 'downloading' variable. Solved-by: Thiago Macieira Signed-off-by: Dirk Hohndel --- qt-ui/downloadfromdivecomputer.cpp | 6 ++++++ qt-ui/downloadfromdivecomputer.h | 1 + 2 files changed, 7 insertions(+) (limited to 'qt-ui') 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; -- cgit v1.2.3-70-g09d2