mobile/download: don't allow download without connection set

It appears that multi line attributes silently fail. Without this change, the Download
button is enabled if vendor and product are chosen, even if there isn't a connection
selected. With this change (having all three conditions on the same line) the code
works as expected.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-07-14 10:25:46 -07:00
parent a4295a3e9f
commit 4ec62441c1

View file

@ -320,8 +320,7 @@ Kirigami.Page {
TemplateButton {
id: download
text: qsTr("Download")
enabled: comboVendor.currentIndex != -1 && comboProduct.currentIndex != -1 &&
comboConnection.currentIndex != -1
enabled: comboVendor.currentIndex != -1 && comboProduct.currentIndex != -1 && comboConnection.currentIndex != -1
onClicked: {
text = qsTr("Retry")