mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 04:23:24 +00:00
Properly initialize device_data_t when downloading
The old gtk branch started out with device_data_t explicitly cleared, but the Qt version never did that. And we actually depend on the deviceid in particular being initialized to zero (and then we fill in the details in the divecomputer download callbacks) Not properly initializing it meant that we ended up with random deviceid's that got added to the divecomputer device lists, and then saved to the XML file without actually matching the data in the dive computers in the actual *dives*. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c917b29701
commit
6fd1e32452
1 changed files with 1 additions and 0 deletions
|
@ -157,6 +157,7 @@ void DownloadFromDCWidget::on_ok_clicked()
|
|||
data.product = strdup(ui->product->currentText().toUtf8().data());
|
||||
data.descriptor = descriptorLookup[ui->vendor->currentText() + ui->product->currentText()];
|
||||
data.force_download = ui->forceDownload->isChecked();
|
||||
data.deviceid = data.diveid = 0;
|
||||
set_default_dive_computer(data.vendor, data.product);
|
||||
set_default_dive_computer_device(data.devname);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue