Use findContainersMetadata whenever possible

This ensures that we only load those containers that we actually need the data of.

Contributes to issue CURA-4243.
This commit is contained in:
Ghostkeeper 2017-10-20 15:09:45 +02:00
parent f7e048aee5
commit 6c4c7fff4d
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
14 changed files with 126 additions and 138 deletions

View file

@ -724,10 +724,10 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
remote_material_guid,
material.getMetaDataEntry("GUID"))
remote_materials = UM.Settings.ContainerRegistry.ContainerRegistry.getInstance().findInstanceContainers(type = "material", GUID = remote_material_guid, read_only = True)
remote_materials = UM.Settings.ContainerRegistry.ContainerRegistry.getInstance().findInstanceContainersMetadata(type = "material", GUID = remote_material_guid, read_only = True)
remote_material_name = "Unknown"
if remote_materials:
remote_material_name = remote_materials[0].getName()
remote_material_name = remote_materials[0]["name"]
warnings.append(i18n_catalog.i18nc("@label", "Different material (Cura: {0}, Printer: {1}) selected for extruder {2}").format(material.getName(), remote_material_name, index + 1))
try: