Set definition by their ID

The new function for setting the definition just adds the ID to the metadata.

Contributes to issue CURA-4243.
This commit is contained in:
Ghostkeeper 2017-11-24 16:45:09 +01:00
parent 37935a8a90
commit ebe766a7c8
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
9 changed files with 24 additions and 22 deletions

View file

@ -121,7 +121,7 @@ class LegacyProfileReader(ProfileReader):
Logger.log("e", "Dictionary of Doom has no translation. Is it the correct JSON file?")
return None
current_printer_definition = global_container_stack.getBottom()
profile.setDefinition(current_printer_definition)
profile.setDefinition(current_printer_definition.getId())
for new_setting in dict_of_doom["translation"]: # Evaluate all new settings that would get a value from the translations.
old_setting_expression = dict_of_doom["translation"][new_setting]
compiled = compile(old_setting_expression, new_setting, "eval")