mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
QML UI: don't overwrite good info with bad
If we don't know the vendor or product, let's not overwrite information that we may have remembered from the last time the user downloaded from this dive computer. Note that this doesn't try to associate a specific cable with the information used last time. We could be smarter here for people who have multiple dive computers, but for the most typical user with just one dive computer, this does seem like a good solution. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fd58441b08
commit
5cdba2d652
1 changed files with 6 additions and 3 deletions
|
@ -410,8 +410,11 @@ Kirigami.ScrollablePage {
|
|||
stackView.push(downloadFromDc)
|
||||
if (vendor !== undefined && product !== undefined && connection !== undefined) {
|
||||
/* set up the correct values on the download page */
|
||||
if (vendor !== -1)
|
||||
downloadFromDc.vendor = vendor
|
||||
if (product !== -1)
|
||||
downloadFromDc.product = product
|
||||
if (connection !== -1)
|
||||
downloadFromDc.connection = connection
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue