mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 22:35:27 +00:00
Mobile/download DC: simplify startup
Since we now store the last used DCs in out preferences we can use the information to pre-populate the DC selector. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
parent
0a3130cd86
commit
69cead138b
1 changed files with 2 additions and 7 deletions
|
@ -348,13 +348,8 @@ Kirigami.Page {
|
|||
|
||||
onVisibleChanged: {
|
||||
comboVendor.currentIndex = comboProduct.currentIndex = comboConnection.currentIndex = -1
|
||||
if (visible) {
|
||||
comboVendor.currentIndex = manager.getDetectedVendorIndex()
|
||||
comboProduct.currentIndex = manager.getDetectedProductIndex(comboVendor.currentText)
|
||||
comboConnection.currentIndex = manager.getMatchingAddress(comboVendor.currentText, comboProduct.currentText)
|
||||
manager.DC_vendor = comboVendor.currentText
|
||||
manager.DC_product = comboProduct.currentText
|
||||
manager.DC_devName = comboConnection.currentText
|
||||
if (visible && PrefDiveComputer.vendor !== "" ) {
|
||||
rememberedDCsGrid.setDC(PrefDiveComputer.vendor1, PrefDiveComputer.product1, PrefDiveComputer.device1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue