From 8734460aff01d2a6e7e8f24cf22b88e23442c291 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 19 Dec 2017 17:36:20 +0100 Subject: [PATCH] Use unique name too if importing multiple legacy profiles Otherwise all of them get the same name and they don't match global/extruder stacks together properly any more. Contributes to issue CURA-4715. --- plugins/LegacyProfileReader/LegacyProfileReader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/LegacyProfileReader/LegacyProfileReader.py b/plugins/LegacyProfileReader/LegacyProfileReader.py index 84fbeccb50..07cd8b0aad 100644 --- a/plugins/LegacyProfileReader/LegacyProfileReader.py +++ b/plugins/LegacyProfileReader/LegacyProfileReader.py @@ -146,7 +146,7 @@ class LegacyProfileReader(ProfileReader): profile.addMetaDataEntry("type", "profile") # don't know what quality_type it is based on, so use "normal" by default profile.addMetaDataEntry("quality_type", "normal") - profile.setName("Imported Legacy Profile") + profile.setName(profile_id) profile.setDirty(True) #Serialise and deserialise in order to perform the version upgrade. @@ -164,7 +164,7 @@ class LegacyProfileReader(ProfileReader): #We need to return one extruder stack and one global stack. 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 = profile.duplicate(new_id = global_container_id, new_name = profile_id) #Needs to have the same name as the extruder profile. global_profile.setDirty(True) #Only the extruder stack has an extruder metadata entry.