Mobile/rememberDCs: remove duplicated code

The code to disable a quick button has moved to the DC matching logic,
in order to inactivate the correct button also for USB DCs.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
Jocke 2018-10-09 19:11:10 +02:00 committed by Dirk Hohndel
parent e7fd50113f
commit 3ce019cf1a

View file

@ -224,10 +224,6 @@ 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)
}
}
@ -237,10 +233,6 @@ 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)
}
}
@ -250,10 +242,6 @@ 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)
}
}
@ -263,10 +251,6 @@ 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)
}
}