From 039c85677a0c8eec71236eaddd52c60b7ef4c94a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 19 Dec 2017 16:40:03 +0100 Subject: [PATCH] Also return a global profile Since we always have an extruder now, also for single-extrusion printers, we need to return both a global profile and an extruder profile. Contributes to issue CURA-4713. --- plugins/LegacyProfileReader/LegacyProfileReader.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/LegacyProfileReader/LegacyProfileReader.py b/plugins/LegacyProfileReader/LegacyProfileReader.py index a0d1442ad8..62ac12dc18 100644 --- a/plugins/LegacyProfileReader/LegacyProfileReader.py +++ b/plugins/LegacyProfileReader/LegacyProfileReader.py @@ -162,4 +162,8 @@ class LegacyProfileReader(ProfileReader): data = stream.getvalue() profile.deserialize(data) - return profile + global_container_id = container_registry.uniqueName("Global Imported Legacy Profile") + global_profile = profile.duplicate(new_id = global_container_id, new_name = "Imported Legacy Profile") #Needs to have the same name as the extruder profile. + global_profile.setDirty(True) + + return [global_profile, profile]