mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 22:35:27 +00:00
Mobile/download DC: disable selected DC button
Disable the button for the currently selected DC. This gives an extra visual hint of which DC is currently selected. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
parent
2d3777ce87
commit
c68ac31425
1 changed files with 17 additions and 0 deletions
|
@ -191,6 +191,10 @@ Kirigami.Page {
|
|||
text: PrefDiveComputer.vendor1 + " - " + PrefDiveComputer.product1
|
||||
onClicked: {
|
||||
// update comboboxes
|
||||
dc1.enabled = false
|
||||
dc2.enabled = true
|
||||
dc3.enabled = true
|
||||
dc4.enabled = true
|
||||
rememberedDCsGrid.setDC(PrefDiveComputer.vendor1, PrefDiveComputer.product1, PrefDiveComputer.device1)
|
||||
}
|
||||
}
|
||||
|
@ -200,6 +204,10 @@ Kirigami.Page {
|
|||
text: PrefDiveComputer.vendor2 + " - " + PrefDiveComputer.product2
|
||||
onClicked: {
|
||||
// update comboboxes
|
||||
dc1.enabled = true
|
||||
dc2.enabled = false
|
||||
dc3.enabled = true
|
||||
dc4.enabled = true
|
||||
rememberedDCsGrid.setDC(PrefDiveComputer.vendor2, PrefDiveComputer.product2, PrefDiveComputer.device2)
|
||||
}
|
||||
}
|
||||
|
@ -209,6 +217,10 @@ Kirigami.Page {
|
|||
text: PrefDiveComputer.vendor3 + " - " + PrefDiveComputer.product3
|
||||
onClicked: {
|
||||
// update comboboxes
|
||||
dc1.enabled = true
|
||||
dc2.enabled = true
|
||||
dc3.enabled = false
|
||||
dc4.enabled = true
|
||||
rememberedDCsGrid.setDC(PrefDiveComputer.vendor3, PrefDiveComputer.product3, PrefDiveComputer.device3)
|
||||
}
|
||||
}
|
||||
|
@ -218,6 +230,10 @@ Kirigami.Page {
|
|||
text: PrefDiveComputer.vendor4 + " - " + PrefDiveComputer.product4
|
||||
onClicked: {
|
||||
// update comboboxes
|
||||
dc1.enabled = true
|
||||
dc2.enabled = true
|
||||
dc3.enabled = true
|
||||
dc4.enabled = false
|
||||
rememberedDCsGrid.setDC(PrefDiveComputer.vendor4, PrefDiveComputer.product4, PrefDiveComputer.device4)
|
||||
}
|
||||
}
|
||||
|
@ -350,6 +366,7 @@ Kirigami.Page {
|
|||
comboVendor.currentIndex = comboProduct.currentIndex = comboConnection.currentIndex = -1
|
||||
if (visible && PrefDiveComputer.vendor !== "" ) {
|
||||
rememberedDCsGrid.setDC(PrefDiveComputer.vendor1, PrefDiveComputer.product1, PrefDiveComputer.device1)
|
||||
dc1.enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue