From 8f9bd0ad0697774c51194606f4fe65c553f6c252 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 20 Mar 2019 17:20:06 +0100 Subject: [PATCH] Adapted to more review comments. [CURA-6294] --- resources/qml/WelcomePages/AddPrinterByIpContent.qml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/resources/qml/WelcomePages/AddPrinterByIpContent.qml b/resources/qml/WelcomePages/AddPrinterByIpContent.qml index 0ffc79cc5b..f3ed58200b 100644 --- a/resources/qml/WelcomePages/AddPrinterByIpContent.qml +++ b/resources/qml/WelcomePages/AddPrinterByIpContent.qml @@ -18,7 +18,6 @@ Item id: addPrinterByIpScreen - property bool hasPushedAdd: false property bool hasSentRequest: false property bool haveConnection: false @@ -42,7 +41,7 @@ Item anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.bottomMargin: UM.Theme.getSize("default_margin").height anchors.horizontalCenter: parent.horizontalCenter - width: (parent.width * 3 / 4) | 0 + width: Math.floor(parent.width * 3 / 4) Item { @@ -99,12 +98,11 @@ Item { if (hostnameField.text.trim() != "") { - addPrinterByIpScreen.hasPushedAdd = true - UM.OutputDeviceManager.addManualDevice(hostnameField.text, hostnameField.text) + enabled = false; + UM.OutputDeviceManager.addManualDevice(hostnameField.text, hostnameField.text); } } - enabled: ! addPrinterByIpScreen.hasPushedAdd BusyIndicator { anchors.fill: parent