Show readable machine type in add by ip page

CURA-6057
This commit is contained in:
Lipu Fei 2019-04-08 13:06:28 +02:00
parent 0bac3e8111
commit ad51d8f1b6
2 changed files with 5 additions and 1 deletions

View file

@ -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)

View file

@ -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")
}