mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Show readable machine type in add by ip page
CURA-6057
This commit is contained in:
parent
0bac3e8111
commit
ad51d8f1b6
2 changed files with 5 additions and 1 deletions
|
|
@ -1630,6 +1630,7 @@ class MachineManager(QObject):
|
||||||
|
|
||||||
return abbr_machine
|
return abbr_machine
|
||||||
|
|
||||||
|
@pyqtSlot(str, result = str)
|
||||||
def getMachineTypeNameFromId(self, machine_type_id: str) -> str:
|
def getMachineTypeNameFromId(self, machine_type_id: str) -> str:
|
||||||
machine_type_name = ""
|
machine_type_name = ""
|
||||||
results = self._container_registry.findDefinitionContainersMetadata(id = machine_type_id)
|
results = self._container_registry.findDefinitionContainersMetadata(id = machine_type_id)
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,10 @@ Item
|
||||||
{
|
{
|
||||||
if (UM.OutputDeviceManager.hasManualDevice)
|
if (UM.OutputDeviceManager.hasManualDevice)
|
||||||
{
|
{
|
||||||
typeText.text = UM.OutputDeviceManager.manualDeviceProperty("printer_type")
|
const type_id = UM.OutputDeviceManager.manualDeviceProperty("printer_type")
|
||||||
|
var readable_type = Cura.MachineManager.getMachineTypeNameFromId(type_id)
|
||||||
|
readable_type = (readable_type != "") ? readable_type : catalog.i18nc("@label", "Unknown")
|
||||||
|
typeText.text = readable_type
|
||||||
firmwareText.text = UM.OutputDeviceManager.manualDeviceProperty("firmware_version")
|
firmwareText.text = UM.OutputDeviceManager.manualDeviceProperty("firmware_version")
|
||||||
addressText.text = UM.OutputDeviceManager.manualDeviceProperty("address")
|
addressText.text = UM.OutputDeviceManager.manualDeviceProperty("address")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue