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.
This commit is contained in:
Ghostkeeper 2017-12-19 16:40:03 +01:00
parent 569715492c
commit 039c85677a
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

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