Adapted to more review comments. [CURA-6294]

This commit is contained in:
Remco Burema 2019-03-20 17:20:06 +01:00
parent 9a2b800fe8
commit 8f9bd0ad06

View file

@ -18,7 +18,6 @@ Item
id: addPrinterByIpScreen id: addPrinterByIpScreen
property bool hasPushedAdd: false
property bool hasSentRequest: false property bool hasSentRequest: false
property bool haveConnection: false property bool haveConnection: false
@ -42,7 +41,7 @@ Item
anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.bottomMargin: UM.Theme.getSize("default_margin").height anchors.bottomMargin: UM.Theme.getSize("default_margin").height
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: (parent.width * 3 / 4) | 0 width: Math.floor(parent.width * 3 / 4)
Item Item
{ {
@ -99,12 +98,11 @@ Item
{ {
if (hostnameField.text.trim() != "") if (hostnameField.text.trim() != "")
{ {
addPrinterByIpScreen.hasPushedAdd = true enabled = false;
UM.OutputDeviceManager.addManualDevice(hostnameField.text, hostnameField.text) UM.OutputDeviceManager.addManualDevice(hostnameField.text, hostnameField.text);
} }
} }
enabled: ! addPrinterByIpScreen.hasPushedAdd
BusyIndicator BusyIndicator
{ {
anchors.fill: parent anchors.fill: parent