CURA-4946 When storing the gcode profile, the definition must be the

quality definition if the printer has_machine_quality. Otherwise the
fdmprinter definition must be used as a fallback. If there is no
quality_definition then the printer definition is use.
This commit is contained in:
Diego Prado Gesto 2018-02-20 11:11:21 +01:00
parent 6a4f519238
commit 6af5a5d4bc
2 changed files with 19 additions and 1 deletions

View file

@ -237,7 +237,7 @@ class CuraContainerRegistry(ContainerRegistry):
if expected_machine_definition is not None and profile_definition is not None and 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> or <message>!", "The machine defined in profile <filename>{0}</filename> doesn't match with your current machine, could not import it.", file_name)}
"message": catalog.i18nc("@info:status Don't translate the XML tags <filename> or <message>!", "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)}
name_seed = os.path.splitext(os.path.basename(file_name))[0]
new_name = self.uniqueName(name_seed)