diff --git a/resources/qml/PrintMonitor.qml b/resources/qml/PrintMonitor.qml index 3bfcea7025..12e95d1e89 100644 --- a/resources/qml/PrintMonitor.qml +++ b/resources/qml/PrintMonitor.qml @@ -44,7 +44,7 @@ Column Repeater { id: extrudersRepeater - model: activePrinter!=null ? activePrinter.extruders : null + model: activePrinter != null ? activePrinter.extruders : null ExtruderBox { diff --git a/resources/qml/PrinterOutput/OutputDeviceHeader.qml b/resources/qml/PrinterOutput/OutputDeviceHeader.qml index 03e6d78699..b5ed1b7b4e 100644 --- a/resources/qml/PrinterOutput/OutputDeviceHeader.qml +++ b/resources/qml/PrinterOutput/OutputDeviceHeader.qml @@ -14,11 +14,19 @@ Item implicitHeight: Math.floor(childrenRect.height + UM.Theme.getSize("default_margin").height * 2) property var outputDevice: null + Connections + { + target: Cura.MachineManager + onGlobalContainerChanged: + { + outputDevice = Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null; + } + } + Rectangle { height: childrenRect.height color: UM.Theme.getColor("setting_category") - property var activePrinter: outputDevice != null ? outputDevice.activePrinter : null Label { @@ -28,7 +36,7 @@ Item anchors.left: parent.left anchors.top: parent.top anchors.margins: UM.Theme.getSize("default_margin").width - text: outputDevice != null ? activePrinter.name : "" + text: outputDevice != null ? outputDevice.activePrinter.name : "" } Label