mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Add fallback in PrinterOutputDevice for getting address
The fallback gives a warning that it's not implemented. Contributes to issue CURA-3161.
This commit is contained in:
parent
c5655d4d8c
commit
e37d8b949e
@ -165,6 +165,11 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
||||
self._job_name = name
|
||||
self.jobNameChanged.emit()
|
||||
|
||||
## Gives a human-readable address where the device can be found.
|
||||
@pyqtProperty(str, constant = True)
|
||||
def address(self):
|
||||
Logger.log("w", "address is not implemented by this output device.")
|
||||
|
||||
@pyqtProperty(str, notify = errorTextChanged)
|
||||
def errorText(self):
|
||||
return self._error_text
|
||||
|
@ -43,7 +43,7 @@ Column
|
||||
Label
|
||||
{
|
||||
id: connectedPrinterAddressLabel
|
||||
text: printerConnected ? connectedPrinter.address : ""
|
||||
text: (printerConnected && connectedPrinter.address != null) ? connectedPrinter.address : ""
|
||||
font: UM.Theme.getFont("small")
|
||||
color: UM.Theme.getColor("text_inactive")
|
||||
anchors.left: parent.left
|
||||
|
Loading…
x
Reference in New Issue
Block a user