mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Fix profile importing for version upgrade
CURA-4946
This commit is contained in:
parent
05c034558d
commit
1f08accbec
1 changed files with 5 additions and 4 deletions
|
|
@ -241,7 +241,7 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
profile.addMetaDataEntry("type", "quality_changes")
|
||||
profile.addMetaDataEntry("definition", global_profile.getMetaDataEntry("definition"))
|
||||
profile.addMetaDataEntry("quality_type", global_profile.getMetaDataEntry("quality_type"))
|
||||
profile.addMetaDataEntry("extruder", extruder.getId())
|
||||
profile.addMetaDataEntry("position", "0")
|
||||
profile.setDirty(True)
|
||||
if idx == 0:
|
||||
# move all per-extruder settings to the first extruder's quality_changes
|
||||
|
|
@ -273,10 +273,11 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
elif profile_index < len(machine_extruders) + 1:
|
||||
# This is assumed to be an extruder profile
|
||||
extruder_id = machine_extruders[profile_index - 1].definition.getId()
|
||||
if not profile.getMetaDataEntry("extruder"):
|
||||
profile.addMetaDataEntry("extruder", extruder_id)
|
||||
extuder_position = str(profile_index - 1)
|
||||
if not profile.getMetaDataEntry("position"):
|
||||
profile.addMetaDataEntry("position", extuder_position)
|
||||
else:
|
||||
profile.setMetaDataEntry("extruder", extruder_id)
|
||||
profile.setMetaDataEntry("position", extuder_position)
|
||||
profile_id = (extruder_id + "_" + name_seed).lower().replace(" ", "_")
|
||||
|
||||
else: #More extruders in the imported file than in the machine.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue