diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index b4e67f6297..2aa6fb382e 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -64,6 +64,12 @@ class PrinterOutputDevice(QObject, OutputDevice): self._connection_state = ConnectionState.closed + self._address = "" + + @pyqtProperty(str, constant = True) + def address(self): + return self._address + def materialHotendChangedMessage(self, callback): Logger.log("w", "materialHotendChangedMessage needs to be implemented, returning 'Yes'") callback(QMessageBox.Yes) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 100438e948..c43d9a826b 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -44,6 +44,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._serial = None # type: Optional[Serial] self._serial_port = serial_port + self._address = serial_port self._timeout = 3 diff --git a/resources/qml/PrinterOutput/OutputDeviceHeader.qml b/resources/qml/PrinterOutput/OutputDeviceHeader.qml index bc9a44e245..d5ce32786c 100644 --- a/resources/qml/PrinterOutput/OutputDeviceHeader.qml +++ b/resources/qml/PrinterOutput/OutputDeviceHeader.qml @@ -44,7 +44,7 @@ Item Label { - text: outputDevice != null ? outputDevice.connectionText : catalog.i18nc("@info:status", "The printer is not connected.") + text: outputDevice != null ? "" : catalog.i18nc("@info:status", "The printer is not connected.") color: outputDevice != null && outputDevice.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") font: UM.Theme.getFont("very_small") wrapMode: Text.WordWrap