mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Connect finished signal of download thread only once
Connect finished signal of download thread only once in constructor of DownloadFromDCWidget instead of every time the Download / Cancel / Retry button is clicked. Fixes minor nuisance: On repeated download attempts multiple massage boxes were shown. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
180e51a906
commit
1fe76b02da
1 changed files with 7 additions and 7 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue