QML UI: only change connection when finding a match
If we can't find a match, just leave it unchanged. This way, if we mis-recognize a device, the user can correct the product (or even vendor) without losing the correct connection. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2ccfce7cf0
commit
ec1b22b487
@ -83,7 +83,9 @@ Kirigami.Page {
|
||||
model: null
|
||||
currentIndex: productidx
|
||||
onCurrentTextChanged: {
|
||||
comboConnection.currentIndex = downloadThread.data().getMatchingAddress(comboVendor.currentText, currentText)
|
||||
var newIdx = downloadThread.data().getMatchingAddress(comboVendor.currentText, currentText)
|
||||
if (newIdx != -1)
|
||||
comboConnection.currentIndex = newIdx
|
||||
}
|
||||
|
||||
onModelChanged: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user