Revert "Merge pull request #5726 from Ultimaker/CL-1331_use_API_for_UM3NetworkPrinting"

This reverts commit bec7b6546d, reversing
changes made to 7094b222b1.

The changes there were not accepted. Please see pull request https://github.com/Ultimaker/Cura/pull/5726 for the discussion about this.

Conflicts:
	plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py -> Just in one TODO comment.
This commit is contained in:
Ghostkeeper 2019-05-23 13:40:11 +02:00
parent 288770b991
commit 4e361a068c
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
5 changed files with 86 additions and 177 deletions

View file

@ -27,14 +27,13 @@ Cura.MachineAction
{
var printerKey = base.selectedDevice.key
var printerName = base.selectedDevice.name // TODO To change when the groups have a name
if (Cura.API.machines.getCurrentMachine().um_network_key != printerKey) // TODO: change to hostname
if (manager.getStoredKey() != printerKey)
{
// Check if there is another instance with the same key
if (!manager.existsKey(printerKey))
{
Cura.API.machines.addOutputDeviceToCurrentMachine(base.selectedDevice)
Cura.API.machines.setCurrentMachineGroupName(printerName) // TODO To change when the groups have a name
manager.refreshConnections()
manager.associateActiveMachineWithPrinterDevice(base.selectedDevice)
manager.setGroupName(printerName) // TODO To change when the groups have a name
completed()
}
else
@ -157,7 +156,7 @@ Cura.MachineAction
var selectedKey = manager.getLastManualEntryKey()
// If there is no last manual entry key, then we select the stored key (if any)
if (selectedKey == "")
selectedKey = Cura.API.machines.getCurrentMachine().um_network_key // TODO: change to host name
selectedKey = manager.getStoredKey()
for(var i = 0; i < model.length; i++) {
if(model[i].key == selectedKey)
{