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>
This commit is contained in:
Dirk Hohndel 2013-05-30 18:21:08 +09:00
parent 56eaea6993
commit 2a4d981d09
2 changed files with 7 additions and 0 deletions

View file

@ -68,6 +68,11 @@ void DownloadFromDCWidget::runDialog()
show(); show();
} }
void DownloadFromDCWidget::stoppedDownloading()
{
downloading = false;
}
void DownloadFromDCWidget::on_vendor_currentIndexChanged(const QString& vendor) void DownloadFromDCWidget::on_vendor_currentIndexChanged(const QString& vendor)
{ {
QAbstractItemModel *currentModel = ui->product->model(); QAbstractItemModel *currentModel = ui->product->model();
@ -179,6 +184,7 @@ void DownloadThread::run()
DownloadFromDCWidget *dfdcw = DownloadFromDCWidget::instance(); DownloadFromDCWidget *dfdcw = DownloadFromDCWidget::instance();
do_libdivecomputer_import(data); do_libdivecomputer_import(data);
process_dives(TRUE, dfdcw->preferDownloaded()); process_dives(TRUE, dfdcw->preferDownloaded());
dfdcw->stoppedDownloading();
} }
InterfaceThread::InterfaceThread(QObject* parent, device_data_t* data): QThread(parent), data(data) InterfaceThread::InterfaceThread(QObject* parent, device_data_t* data): QThread(parent), data(data)

View file

@ -43,6 +43,7 @@ public slots:
void on_ok_clicked(); void on_ok_clicked();
void on_cancel_clicked(); void on_cancel_clicked();
void runDialog(); void runDialog();
void stoppedDownloading();
void on_vendor_currentIndexChanged(const QString& vendor); void on_vendor_currentIndexChanged(const QString& vendor);
private: private:
Ui::DownloadFromDiveComputer *ui; Ui::DownloadFromDiveComputer *ui;