Send only original files

When we re-serialize them, the XML file will not be exactly the same so the signature will fail to match. We need to send the original bytes.

This changes the behaviour: It now sends all non-default files instead of all files that were loaded fully.

Contributes to issue CURA-5034.
This commit is contained in:
Ghostkeeper 2018-06-08 16:02:00 +02:00
parent ddb80be1ec
commit 4727340ae4
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
2 changed files with 16 additions and 27 deletions

View file

@ -541,22 +541,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
#
# This gets called when connecting to a printer as well as when sending a
# print.
#
# TODO: For now we send all material profiles that are fully loaded. See
# if that has any performance impact. If not, we can try sending ALL
# profiles. If it has, we may need to limit it to the profiles that are
# active in the current machine.
def sendMaterialProfiles(self) -> None:
container_registry = ContainerRegistry.getInstance()
base_files = set()
for material_metadata in container_registry.findContainersMetadata(type = "material"):
if container_registry.isLoaded(material_metadata["id"]):
if "base_file" not in material_metadata:
continue #If there's no base file then there was no file for it (such as empty_material).
base_files.add(material_metadata["base_file"])
job = SendMaterialJob(material_ids = base_files, device = self)
job = SendMaterialJob(device = self)
job.run()
def loadJsonFromReply(reply):