aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/downloadfromdivecomputer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/downloadfromdivecomputer.cpp')
-rw-r--r--desktop-widgets/downloadfromdivecomputer.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp
index 424cf277a..637f6034d 100644
--- a/desktop-widgets/downloadfromdivecomputer.cpp
+++ b/desktop-widgets/downloadfromdivecomputer.cpp
@@ -71,6 +71,13 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) :
connect(close, SIGNAL(activated()), this, SLOT(close()));
connect(quit, SIGNAL(activated()), parent, SLOT(close()));
+ connect(&thread, SIGNAL(finished()),
+ this, SLOT(onDownloadThreadFinished()), Qt::QueuedConnection);
+
+ //TODO: Don't call mainwindow.
+ MainWindow *w = MainWindow::instance();
+ connect(&thread, SIGNAL(finished()), w, SLOT(refreshDisplay()));
+
auto dc = SettingsObjectWrapper::instance()->dive_computer_settings;
if (!dc->dc_vendor().isEmpty()) {
ui.vendor->setCurrentIndex(ui.vendor->findText(dc->dc_vendor()));
@@ -330,13 +337,6 @@ void DownloadFromDCWidget::on_downloadCancelRetryButton_clicked()
dc->setDownloadMode(ui.bluetoothMode->isChecked() ? DC_TRANSPORT_BLUETOOTH : DC_TRANSPORT_SERIAL);
#endif
- connect(&thread, SIGNAL(finished()),
- this, SLOT(onDownloadThreadFinished()), Qt::QueuedConnection);
-
- //TODO: Don't call mainwindow.
- MainWindow *w = MainWindow::instance();
- connect(&thread, SIGNAL(finished()), w, SLOT(refreshDisplay()));
-
// before we start, remember where the dive_table ended
previousLast = dive_table.nr;
thread.start();