Fix button enabled flags

CURA-6483
This commit is contained in:
Lipu Fei 2019-04-26 13:30:24 +02:00
parent dbd8d4e74c
commit 278d8ee587

View file

@ -111,7 +111,7 @@ Item
anchors.left: hostnameField.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@button", "Add")
enabled: !addPrinterByIpScreen.hasRequestInProgress && !addPrinterByIpScreen.hasRequestFinished && (hostnameField.state != "invalid" && hostnameField.text != "")
enabled: !addPrinterByIpScreen.hasRequestInProgress && !addPrinterByIpScreen.isPrinterDiscovered && (hostnameField.state != "invalid" && hostnameField.text != "")
onClicked:
{
const address = hostnameField.text
@ -278,6 +278,6 @@ Item
base.showNextPage()
}
enabled: addPrinterByIpScreen.hasRequestFinished && addPrinterByIpScreen.isPrinterDiscovered
enabled: addPrinterByIpScreen.isPrinterDiscovered
}
}