mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Make remove manual device (also) work (as failure-state of add manual device). [CURA-6294]
This commit is contained in:
parent
f13ceb2a4d
commit
8250c91fc4
2 changed files with 39 additions and 15 deletions
|
|
@ -113,6 +113,12 @@ Item
|
|||
! addPrinterByIpScreen.haveConnection
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: UM.OutputDeviceManager
|
||||
onManualDeviceChanged: { addPrinterButton.enabled = ! UM.OutputDeviceManager.hasManualDevice }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -172,9 +178,18 @@ Item
|
|||
target: UM.OutputDeviceManager
|
||||
onManualDeviceChanged:
|
||||
{
|
||||
typeText.text = UM.OutputDeviceManager.manualDeviceProperty("printer_type")
|
||||
firmwareText.text = UM.OutputDeviceManager.manualDeviceProperty("firmware_version")
|
||||
addressText.text = UM.OutputDeviceManager.manualDeviceProperty("address")
|
||||
if (UM.OutputDeviceManager.hasManualDevice)
|
||||
{
|
||||
typeText.text = UM.OutputDeviceManager.manualDeviceProperty("printer_type")
|
||||
firmwareText.text = UM.OutputDeviceManager.manualDeviceProperty("firmware_version")
|
||||
addressText.text = UM.OutputDeviceManager.manualDeviceProperty("address")
|
||||
}
|
||||
else
|
||||
{
|
||||
typeText.text = ""
|
||||
firmwareText.text = ""
|
||||
addressText.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -184,8 +199,17 @@ Item
|
|||
target: UM.OutputDeviceManager
|
||||
onManualDeviceChanged:
|
||||
{
|
||||
printerNameLabel.text = UM.OutputDeviceManager.manualDeviceProperty("name")
|
||||
addPrinterByIpScreen.haveConnection = true
|
||||
if (UM.OutputDeviceManager.hasManualDevice)
|
||||
{
|
||||
printerNameLabel.text = UM.OutputDeviceManager.manualDeviceProperty("name")
|
||||
addPrinterByIpScreen.haveConnection = true
|
||||
}
|
||||
else
|
||||
{
|
||||
printerNameLabel.text = catalog.i18nc("@label", "Could not connect to device.")
|
||||
addPrinterByIpScreen.hasSentRequest = false
|
||||
addPrinterByIpScreen.haveConnection = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue