mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-25 03:41:08 -07:00
Merge branch 'master' into feature_intent_container_tree
This commit is contained in:
commit
b18565d9cf
153 changed files with 12828 additions and 252 deletions
|
|
@ -242,12 +242,11 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
|
||||
# And check if the profile_definition matches either one (showing error if not):
|
||||
if profile_definition != expected_machine_definition:
|
||||
Logger.log("e", "Profile [%s] is for machine [%s] but the current active machine is [%s]. Will not import the profile", file_name, profile_definition, expected_machine_definition)
|
||||
return { "status": "error",
|
||||
"message": catalog.i18nc("@info:status Don't translate the XML tags <filename>!", "The machine defined in profile <filename>{0}</filename> ({1}) doesn't match with your current machine ({2}), could not import it.", file_name, profile_definition, expected_machine_definition)}
|
||||
Logger.log("d", "Profile {file_name} is for machine {profile_definition}, but the current active machine is {expected_machine_definition}. Changing profile's definition.".format(file_name = file_name, profile_definition = profile_definition, expected_machine_definition = expected_machine_definition))
|
||||
global_profile.setMetaDataEntry("definition", expected_machine_definition)
|
||||
for extruder_profile in extruder_profiles:
|
||||
extruder_profile.setMetaDataEntry("definition", expected_machine_definition)
|
||||
|
||||
# Fix the global quality profile's definition field in case it's not correct
|
||||
global_profile.setMetaDataEntry("definition", expected_machine_definition)
|
||||
quality_name = global_profile.getName()
|
||||
quality_type = global_profile.getMetaDataEntry("quality_type")
|
||||
|
||||
|
|
@ -315,9 +314,9 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
result = self._configureProfile(profile, profile_id, new_name, expected_machine_definition)
|
||||
if result is not None:
|
||||
return {"status": "error", "message": catalog.i18nc(
|
||||
"@info:status Don't translate the XML tags <filename> or <message>!",
|
||||
"@info:status Don't translate the XML tag <filename>!",
|
||||
"Failed to import profile from <filename>{0}</filename>:",
|
||||
file_name) + " <message>" + result + "</message>"}
|
||||
file_name) + " " + result}
|
||||
|
||||
return {"status": "ok", "message": catalog.i18nc("@info:status", "Successfully imported profile {0}", profile_or_list[0].getName())}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue