Use class properties

Contributes to CL-1331
This commit is contained in:
Ian Paschal 2019-05-15 10:09:50 +02:00
parent c7f6351903
commit 5774813704

View File

@ -27,7 +27,7 @@ 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)
if (Cura.API.machines.getCurrentMachine().um_network_key != printerKey) // TODO: change to hostname
{
// Check if there is another instance with the same key
if (!manager.existsKey(printerKey))
@ -157,7 +157,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"]
selectedKey = Cura.API.machines.getCurrentMachine().um_network_key // TODO: change to host name
for(var i = 0; i < model.length; i++) {
if(model[i].key == selectedKey)
{