mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:58:59 +08:00
Show readable machine type in add by ip page
CURA-6057
This commit is contained in:
parent
0bac3e8111
commit
ad51d8f1b6
@ -1630,6 +1630,7 @@ class MachineManager(QObject):
|
||||
|
||||
return abbr_machine
|
||||
|
||||
@pyqtSlot(str, result = str)
|
||||
def getMachineTypeNameFromId(self, machine_type_id: str) -> str:
|
||||
machine_type_name = ""
|
||||
results = self._container_registry.findDefinitionContainersMetadata(id = machine_type_id)
|
||||
|
@ -196,7 +196,10 @@ Item
|
||||
{
|
||||
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")
|
||||
addressText.text = UM.OutputDeviceManager.manualDeviceProperty("address")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user