mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 05:53:59 -06:00
(Add-by-IP/onboard) Cleanup and use discovered-printer instead of machine-manager. [CURA-6294]
This commit is contained in:
parent
61821e6378
commit
2693eecd33
3 changed files with 20 additions and 11 deletions
|
@ -55,7 +55,6 @@ Item
|
|||
width: parent.width
|
||||
anchors.top: parent.top
|
||||
anchors.margins: 20
|
||||
//anchors.bottomMargin: 20
|
||||
font: UM.Theme.getFont("default")
|
||||
|
||||
text: catalog.i18nc("@label", "Enter the IP address or hostname of your printer on the network.")
|
||||
|
@ -111,7 +110,12 @@ Item
|
|||
BusyIndicator
|
||||
{
|
||||
anchors.fill: parent
|
||||
running: { ! parent.enabled && ! addPrinterByIpScreen.hasSentRequest }
|
||||
running:
|
||||
{
|
||||
! parent.enabled &&
|
||||
! addPrinterByIpScreen.hasSentRequest &&
|
||||
! addPrinterByIpScreen.haveConnection
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -154,6 +158,7 @@ Item
|
|||
{
|
||||
id: printerInfoGrid
|
||||
anchors.top: printerNameLabel.bottom
|
||||
anchors.margins: 20
|
||||
columns: 2
|
||||
columnSpacing: 20
|
||||
|
||||
|
@ -217,10 +222,8 @@ Item
|
|||
fixedWidthMode: true
|
||||
onClicked:
|
||||
{
|
||||
Cura.MachineManager.addMachine(
|
||||
UM.OutputDeviceManager.manualDeviceProperty("printer_type"),
|
||||
UM.OutputDeviceManager.manualDeviceProperty("name")
|
||||
)
|
||||
CuraApplication.getDiscoveredPrintersModel().createMachineFromDiscoveredPrinterAddress(
|
||||
UM.OutputDeviceManager.manualDeviceProperty("address"))
|
||||
UM.OutputDeviceManager.setActiveDevice(UM.OutputDeviceManager.manualDeviceProperty("device_id"))
|
||||
base.showNextPage()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue